Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I Run a program as a Service? 1

Status
Not open for further replies.

vcsltd

Vendor
May 23, 2002
11
CA
I have a program that must be run when the server is started, but I am unsure of how to set it up to run as a Service.
I know this is possible to do because I have seen it mentioned on a forum before, But I can't seem to find it.

Can anyone help please?
 
I'm sure there is a utility to convert from an App to a service on the NT4 Resource Kit, but I don't have my CD with me to check the name.

I think its called INSTSRV.EXE
New Zealand, a great place to live.
tokala@orcon.net.nz
 
First, you have to install srvany as a service

instsrv [servicename] [path]\srvany.exe

then edit this registry key to specify the program you wish to start:

HKLM\SYSTEM\CurrentControlSet\Services\[servicename]

add the key "Parameters" of type "REG_SZ" and type in the value Your program's file name.
Doing that you'll be able to see in your services list the new [servicename], and you can choose to start it automatically with Windows using a particular account.
 
Thanks guys, I'm sure this will come in handy some day

[yinyang] In a world without walls and fences, who needs Windows and Gates?
 
Thank-you very much.
I will work on this today.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top