I have the sample console application which is supposed to be executed in the startup task, i want to execute the console application through batch file, please can i know the right syntax to execute it.
-
Console application is like usual exe files, you can use "Call ConsoleApp.exe" ConsoleApp will be your application nameKiru– Kiru2012-04-04 07:21:51 +00:00Commented Apr 4, 2012 at 7:21
-
This thread discussed on the same: stackoverflow.com/questions/221730/…Prakash– Prakash2012-04-04 07:26:51 +00:00Commented Apr 4, 2012 at 7:26
-
2Why exactly is the question downvoted? It's clearly stated and it's unreasonable to expect any sample code in this case. I remember having the exact same problem some 21 years ago (well, not with C#).Jacek Gorgoń– Jacek Gorgoń2012-04-04 07:50:19 +00:00Commented Apr 4, 2012 at 7:50
Add a comment
|
3 Answers
In my project .
Folder is like
D:\Run
│ main.bat >> your batch file
│
└─Test
│
│
└─your application
Content of the bat file is like
cd /d %~dp0test\
Checker.exe>check.log
The first line
cd /d %~dp0test\
is replace the runtime directory to the full path of the appliction file.
>check.log
Is an option to output the log file.