Results 1 to 5 of 5

Thread: Running a program/batch as a service

  1. #1
    Join Date
    Mar 2009
    Posts
    92

    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.

  2. #2
    Join Date
    Apr 2008
    Posts
    3,267

    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.

  3. #3
    Join Date
    Nov 2005
    Posts
    3,026

    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.

  4. #4
    Join Date
    May 2008
    Posts
    4,085

    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.

  5. #5
    Dr. V Guest

    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

Similar Threads

  1. Replies: 6
    Last Post: 14-05-2012, 05:57 PM
  2. Shutdown window after running batch file
    By Jaiwanti in forum Operating Systems
    Replies: 4
    Last Post: 13-12-2010, 06:25 PM
  3. Closing a Program With BASIC/Batch
    By zaid in forum Operating Systems
    Replies: 3
    Last Post: 03-08-2009, 09:58 AM
  4. Ftp Batch program
    By Ryder in forum Networking & Security
    Replies: 4
    Last Post: 25-03-2009, 05:29 PM
  5. Running a batch file from another?
    By Linn Kubler in forum Windows Server Help
    Replies: 2
    Last Post: 28-02-2008, 09:57 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,490,001.31204 seconds with 17 queries