PDA

View Full Version : Software Create your own user-defined services Windows NT/2000/XP/2003



vampiro
02-27-2008, 08:46 AM
The Windows NT/2000 Resource Kit provides two utilities that allow you to create a Windows user-defined service for Windows applications and some 16-bit applications (but not for batch files).

Whats needed for Windows NT/2000:
Instrsrv.exe installs and removes system services from Windows NT/2000
Srvany.exe allows any Windows application to run as a service.
You can download both files here srvany.zip (http://www.tacktech.com/pub/microsoft/service/srvany.zip)

This zip includes three files. The two you need srvany.exe and instsrv.exe to install the services and also srvany.wri which documents everything you can do with the program.
Note: Make sure the Services Manager is closed while running the DOS commands.

1.You will need to put these files in a directory called reskit At a MS-DOS command prompt(Start | Run | "cmd.exe"), type the following command:
<path>\reskit\INSTSRV.EXE "Service Name" <path>\reskit\SRVANY.EXE
This creates the service in the Services manager and the registry keys to setup what program to run. reskit can be any directory

http://img297.imageshack.us/my.php?image=addsrvoc9.gif

2. Next open regedit.exe Start | run | regedit.exe
WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

URL=http://img257.imageshack.us/my.php?image=regeditxg0.gif

3.Next navigate to this registry key.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\service name

URL=http://img411.imageshack.us/my.php?image=keypj9.gif

4. From the Edit menu, click Add Key and name it Parameters
Next from the Edit menu, click Add Value and type this information.
Value Name: Application
Data Type : REG_SZ
String : <path>\<application.ext>

URL=http://img259.imageshack.us/my.php?image=addkeyxa8.gif

5. Now you can start your service from the Service Manager. Go to Start | Run | "services.msc". Find the service name you just created and right click and select start.

URL=http://img183.imageshack.us/my.php?image=srvmgrha7.gif

Thats It your new service will start and you can acheck by going into task manager and finding the name you called your service.

To remove the service.

Just run this command from command prompt.
<path>\reskit\INSTSRV.EXE "Service Name" REMOVE

URL=http://img521.imageshack.us/my.php?image=removejk6.gif