We were not exactly sure about the behavior of
When starting a
cmd.exe and execute
myApp.exe, if it directly returns to the C-prompt, it is a "background" app. (i.e. it goes directly to the background). In that case, if you use
myApp.exe directly in the Task-scheduler, there is no prompt to return to. (That appears to be the case here)
You can keep the prompt open if you start
cmd.exe in the Task-Scheduler. You can do that by putting
cmd.exe in the run-line-box and
/K myApp.exe in the parameter-box. You will be returned to the C-prompt after unlocking. In that prompt you can use
TASKKILL /F /IM myApp.exe.exe /T to kill
myApp.exe (or if the
myApp.exe has a kill-switch, use that).
For others using an
app which doesn't return to the C-prompt:
myApp.exe does have output in
cmd.exe and does not return to the C-prompt you can use
/C myApp.exe. Because
myApp.exe will keep the prompt open. A Ctrl+C will likely terminate
myApp.exe and also exit the prompt.
/K was used in this case you will be returned to the C-prompt (having to do an extra
exit-command to exit the prompt).
/C Carries out the command specified by string and then terminates
/K Carries out the command specified by string but remains