Jump to content

How do you create a windows service


DarthVega
 Share

Recommended Posts

Ok, I figured out how to create a service using sc.exe, but now I have a bigger problem... the service won't start. I've set it to auto and everything. When I try to start it manually it works for 10 seconds and gives me this error message: Could not start the autoitservice on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashon.

Any ideas?

Link to comment
Share on other sites

Did you make it as an infinite loop ? like :

while 1 
.....
Wend

I'm not sure, but I think if you make a program as a service you need to make it respond to the service service (?) ie. it doesn't respond to the start command. an OnEvent thingie might be better.

you might have to browse through the documentation regarding the services and what it's supposed to return.

> there are 10 types of people in the world, those who understand binary and those who don't.

Link to comment
Share on other sites

Sweet, the process actually works now... although there are still a few more problems. The service can still be stopped by terminating the either the autoit exe or the srvany.exe. Also, when the autoit exe is terminated the service doesn't restart the program (even tho I've told it to).

Thanks for the help.

Edited by DarthVega
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...