Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am having two exe, One exe will internally call other exe from the server

I am facing issue while execution the Exe using Task scheduler
while executing exe using task scheduler the second exe gets triggered and then goes in hang state


Please help me on this

Is that any environment issue or the Cmd.exe issue?
Posted
Comments
Richard MacCutchan 14-Jan-15 7:39am    
Well since we cannot see your screen, and have no idea what your code does, it is impossible to make any sort of guess. Please edit your question and add some proper details.

1 solution

If you run a program using cmd.exe or to run a batch script it may seem hanging if the command was not parsed correctly. The cmd.exe program is just active in the background waiting for commands to enter (but as it is not visible this can take forever). cms.exe from the taskmanager is started with the current directory to "c:\windows\system32". You might want to add the path to your exe or bat script to the environment path or just specify the absolute path to your program (between quotes if there are spaces involved).
My advice would be to simply test it by simply copying your exe or bat to "c:\test" and then in the task something like "c:\test\test.bat" or "c:\test\test.exe".

Good luck!

ps. in case of a bat file, you might also need to terminate it by putting EXIT explicitly at the end.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900