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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running program as a service

Status
Not open for further replies.

redoctober

Programmer
Oct 25, 2000
37
CA
I've wrote a little program for win2k (a simple network server) and i need it to be run on background (like a service i guess). Basicaly i need it to start running when computer is turned on even if no one logs in. Is it possible to do just but tweaking windows? And if yes, how? Or i have to write it in some special way? thanks for any help.
 
Yes, I think you can put an entry in the registry under:

HKLM/software/microsoft/windows/currentversion/runservices

Give it name of RunProgram - where Program is a descriptive name of your program.
Give it a type of REG_SZ.
Give it data describing the path to the executable.

Let me know if this works, I've never tried it - I'm just guessing.

Will.
 
The windows 2000 resource kit includes utilities called instsrv.exe and srvany.exe. These tool will allow you to configure a windows application to run as a service. Documentation on how to use them is included in the resource kit. If you do not have the resource kit, I suggest you immediately sign up for TechNet. :) Marc Creviere
 
Thanks guys.
dentarthurdent:
I tried to do what you sugested... But first, i don't have runservices key in the regestry, i only have "run", "runonce" and "runonceex". When i put the string into "run" the program only starts when i login. The same effect if i just put a shortcut into StartUp.

FilthPig:
Thank you for a tip. Resource Kit seems like a very good tool, unfortunatly it costs money :). And the way i understand srvany.exe allows you to run any program as a service. So without it i guess i'm stuck, right?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top