Running a program/batch as a service
hi,
I added a windows service to run a custom program which is called from a batch file. i am getting "The service did not respond to the start or control request in a timely fashion".There's an open source application of this type, but I can't remember It's name.All I can think of is that it is not valid to try to run a batch file as a service.
Re: Running a program/batch as a service
The ServiceBase class calls the OnStop method directly from the Service command handler that is defined in the ScDispatcherLoop of the Advapi32.dll file. After 30 seconds, if the ScDispatcherLoop thread is not ready to receive a new service command from the service control manager, Windows Service Controller marks the service as "time out." Therefore, you receive this error message.
Re: Running a program/batch as a service
hi,
Download the PSTools from Microsoft and use PSEXEC - that should allow you to execute remote commands. Once downloaded, run PSEXEC /? for usage information.
Re: Running a program/batch as a service
Often this problem is caused by firewall software or antivirus script blocking software. If you're running any of this try disabling firewalls or script blocking and see if your IIS works.
Re: Running a program/batch as a service
You should try this. It starts the program with no window. It actually flashes up for a second but goes away fairly quickly.
start "name" /B myprogram.exe param1