How To Create a User-Defined Service under Windows 2000/2003
There are occasions when it may be useful to run an application as a
Windows 2000 service. The Windows 2000 Resource Kit provides two utilities,
that allow you to establish a user-defined service.
- Utility to add or remove Windows 2000/2003 Services
- Utility to allow any NT application to run as a Windows 2000/2003 service
Warning: The following text includes instructions on modifying the
system registry. Use extreme caution whenever you make changes to the registry.
Inadvertant modifications may cause irreparable damage to your NT system.
Make sure that you are logged on as a user with administrative privileges.
Also, verify that both INSTSRV.EXE and SRVANY.EXE are stored in a directory
within the search path.
- Open up an MS-DOS command prompt.
- Type the following command: INSTSRV [service name] SRVANY.EXE
where [service name] is the name of the service you are setting up.
The service name can be whatever you want, but should be descriptive.
- Open up the Registry Editor (Click on the Start Button, select Run, and
- Locate the following key:
- From the Edit menu, select New, select Key, and name the new key
- Highlight the Parameters key
- From the Edit menu, select New, select String Value, and name the
new value Application
- From the Edit menu, select Modify, and type in the full path name and
application name, including the drive letter and file extension
Example: D:\Program Files\Network Monitor\netmon.exe
- Close the Registry Editor.
Microsoft Support Page: HOWTO set up a user-defined service (Article ID: Q137890)