windows - How to redirect output to a file in a batch file? -


in windows 7, have batch file runs exe in sub-directory of bat file, first changes current directory folder, runs exe. goes wrong, see console window short time , program doesn't start. since output console displayed less second, can't see error message.

bat file is:

cd /d "%~dp0my_subfolder" start "" myapplication.exe 

how redirect output error message text file (the text file in same directory bat file), can read error message? command should add bat file above?

use:

 start "" myapplication.exe > mytextfile.txt 2>&1 

instead run batch file cmd know error


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -