For example:
PSKILL NOTEPAD >output.txt 2>&1
This will direct stdout and stderr to a file name output.txt.
See Underused features of Windows batch files for more details.
For example:
PSKILL NOTEPAD >output.txt 2>&1
This will direct stdout and stderr to a file name output.txt.
See Underused features of Windows batch files for more details.