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 to run aplication as a service in W2k Server

Status
Not open for further replies.

NeilVD

IS-IT--Management
Dec 23, 2005
2
PL
I got f.e. ultima online automap server.

this is one file witch is run with prompt:
C:\Instalki\uoamsvr21.exe -pw alamakota

i want it to start as a service.

what should i do?
 
Write a script that creates a servce in VBScript.

Here's something that shows the basic idea:


You may want to write the script in such a way that it has an uninstall flag also.

Hope this helps!

-Tom

"I would rather have a free bottle in front of me, than a pre-frontal lobotomy..."

-Shrubble
 


Thx ;] Ill try that way.

I tryed to do some changes in registry basing on the existing but...

U know ive looking for program on my serv witch is start as a service and try to make a copy of its registry lines and remake with new parameters;] but it doesnt work :( after restart - the service sill dont want to start until i log to the server.. k... ill try Your way;] THX. Ill be writing smth here.

- Lukas
 
It's far easier to use the script host because, with just a few lines of code, the script interpreter pops the service in there without you having to worry about if you added it correctly everywhere.

The setup we use in my shop is a VBScript that installs (or removes or configures) another VBScript as a service. This other script, in turn, manages when and how the binary .exe that is at the root of the service is invoked.

One nice thing about this arrangement is that by using a second script to manage the executable(which simply hosts the core functionality of the service), you can simply stop the service, tweak the script, and then restart the service, and the new changes are immediate.

We've also done the opposite, where the binary is the service that periodically calls a script that contains the primary functionality- again, the advantage is not having to recompile every time you change a parameter.

"I would rather have a free bottle in front of me, than a pre-frontal lobotomy..."

-Shrubble
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top