Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Running applications as a Windows Service

- - - - -

  • Please log in to reply

#1
-=blaster=-

-=blaster=-

    Member

  • Member
  • PipPipPip
  • 181 posts
Running applications as a Windows Service

Taken, in part from, Microsoft Support.

I use this method for setting up game servers. This procedure uses the registry editor, USE AT YOUR OWN RISK!!!

To use as a server, make sure the computer you choose will boot with only a network cable and power cable attatched. Some BIOS changes may have to be made.

Make sure that the desired application runs correctly from a shortcut on the desktop and/or a *.bat file. You will need this later.

Obtain these files: Instsrv.exe and Srvany.exe from Microsoft.

Copy them into a directory that has NO SPACES IN THE PATH. I recommend the root of a drive.

Open a Command Window.

Execute the following: PATH_TO\Instsrv.exe NameOfService PATH_TO\Srvany.exe

Example: C:\Instsrv.exe NameOfService C:\Srvany.exe

Open the registry editor and navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NameOfService to verify the service was created.

Right click on the new service and add a new "Key" named "Parameters"

Now, right click "Parameters" and add the following "String Value"s: AppDirectory, Application, and AppParameters.

Right click each "String Value" and "Modify" them as follows:

AppDirectory: The full path to the application's directory. Copy and paste from the shortcut/.bat file.

Example: C:\Games\ut2004\system

Application: The full path to the application.exe. Copy and paste from the shortcut/.bat file.

Example: C:\Games\ut2004\system\UCC.exe

AppParameters: Any parameters required to start the application to your specifications. Copy and paste from the shortcut/.bat file.

Example: server ONS-Torlan?game=Onslaught.ONSOnslaughtGame ini=UT2004.ini log=ons.log

Exit the registry editor.

Go to Start>Run>services.msc, select the new service and restart.

If everything is in the proper place the application will start. Check the Task Manager for, in this case, UCC.exe.

By default the new service will automatically start at Windows startup. Always reboot when you have toggled the service during testing.
  • 0

Advertisements







Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP