KINDLY REPLY HOW YOU LIKE IT

Programming Tutorials on different platforms

Any general and specialized interesting programming language training and exploration . Fun with knowledge .

Search This Blog

Saturday, June 19, 2010

Turn Any .exe File Into A Service

Turn Any .exe File Into A Service


This method has not been tested with Vista, though it is known to work with 2000/XP/2003 Server.

The following steps will allow you to turn almost any .exe file into a service. Please note that some .exe files will need command line parameters passed to run with functionality.

Log in with administrative privileges and then check that both INSTSRV.EXE and SRVANY.EXE are stored in a directory within the search path.

Take care where you put SRVANY.EXE because it must stay there for the service to run.

1. Open up an MS-DOS command prompt and navigate to where you saved the files.
2. 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 anything you like, but you should make the name descriptive.
3. Remove service example:
INSTSRV [service name] REMOVE where [service name] is the service name.
4. Open up the Registry Editor (Click on the Start Button > Run, and type REGEDIT). Locate the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\[service name]
* From the Edit menu, click New > select Key, and name the new key Parameters
* Highlight the Parameters key
* From the Edit menu, select New > 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: C:\Program Files\Network Monitor\netmon.exe
5. Close the Registry Editor.
6. You can now start the service from services.msc.

No comments:

Post a Comment