I'm trying to run an iteration program, and whenever I click on it, it opens then terminates. When I open the input text file, using the program, the iteration completes, then the window instantly closes. How can I either run it so that the window does not close (and I can see my results), or manage to do the same thing in command prompt. I'm not super familiar with doing stuff in command prompt.
This will leave the console window open even after MyApp.exe terminates:
cmd /K "C:\SomeFolder\MyApp.exe"
You can create a shortcut with the above. This solution works with all console programs and does not require you to go through Command Prompt every time (or modify the original exe which you usually can't).
/K switch has been around since NT days :-p
A way to run a file with cmd and have it stay open:
start /b /w /D"C:\StartAndEnd\scripts" NVIDIASystemMonitor.au3
The "/w" means it waits until the application closes.
If you are on 64bit there here is another example:
c:\windows\syswow64\cmd.exe /c c:\windows\sysnative\cmd.exe /c start /b /w /D"C:\StartAndEnd\scripts" NVIDIASystemMonitor.au3
This makes sure it still runs as 64bit.
To save the hassle of having to potentially cd into the correct folder when you're probably already there in windows explorer, simply hold shift, right click on any white space in the folder and click "Open command prompt window here" to open cmd with its directory already set. You can then just type the name of the exe itself