- Abussi Technical Blog - http://managedsystemservices.co.uk -
Running an Application as a service
Posted By Paul On 08/01/2007 @ 12:58 pm In Server Tips | No Comments
The following article explains how to run an application as a service on your Windows server.
Applications, usually files with an .exe extension, can only be run when your server is logged in. This can sometimes be inconvenient as it requires you to keep your server logged in all the time. However, Windows provides the functionality to configure an application to run as a service, so that you do not need to keep your server logged in all the time.
NOTE: The following steps involve modifying the registry on your server. If done improperly your server could stop responding and you may lose all of your data. If you do not feel comfortable performing this please don’t.
To configure your application as a service, please follow these steps:
1. Log into your server
2. Download Microsoft’s Resource Kit (rktools.exe) here. This Resource Kit contains instsrv.exe and srvany.exe.
3. Run the rktools.exe file from the location you selected in step 2. Follow the installation instructions.
4. Click Start and select Run.
5. Type cmd and click OK.
6. Within the prompt type instsrv MyService srvany.exe where MyService is the name for the service. The name for the service can be whatever you want, but should be descriptive.
7. Press Enter.
8. When the command completes, click Start and select Run.
9. Type regedit and click OK to open the Registry.
10. Expand HKEY_LOCAL_MACHINE, expand SYSTEM, expand CurrentControlSet, expand Services.

11. Find the name of the service you created in the list and select it so that it is highlighted.
12. From the Edit menu, select New and select Key.

13. Name the key Parameters.
14. Select the Parameters key so that it is highlighted.
15. From the Edit menu, select New, select String Value.

16. Name the string value Application.
17. Select the Applications string so that it is highlighted.
18. From the Edit menu, select Modify.

19. Enter the full path to the application executable, including the drive letter and the application extension.

20. Close the Registry.
21. Click Start, Programs, Administrative Tools and select Services.
22. Find the service you created and click Start.

Article printed from Abussi Technical Blog: http://managedsystemservices.co.uk
URL to article: http://managedsystemservices.co.uk/2007/01/08/running-an-application-as-a-service/
Click here to print.