![]()
This document will describe how to configure any application to run as a Windows service. This is useful if you wish to have the application start at windows boot-up, or need to have the application availible regardless of wether a user has logged on (or off) of the system. Note: this is significantly different than placing a startup script w/i a user's Startup folder, these 'applications' only run if the user has logged on, and stop when the user exits.
As a prerequisite, you must download and install the Windows 2003 Resource Kit Tools Note that you can install the Windows 2003 resource kit tools on a Windows 2003 or Windows XP system. If your host system runs Windows 2000 or Windows NT, you can acquire Instsrv and Srvany from the Win2K or NT resource kit CD-ROMs or you can install the Windows 2003 resource kit tools on an XP system and just copy Instsrv and Srvany from the XP system to the %windir% folder on your Win2K or NT host system. The Windows 2003 versions of Instsrv and Srvany run on the earlier OSs without any problems
You will use the instsrv.exe tool to create the service, and the srvany utility to actually run the application. You will also need to now the application path and any parameters that are required to configure (and run) the application as a service.
If an application requires user interaction on startup, it cannot be run as a service. (it will wait until a user logs on to provide the required input). For applications like this you need to disable ALL user input before a successful bott time startup will be achived.
While VMware does not natively support being run as a windows service, the ability to do this has some interesting ramifications. I will illustrate the service creation steps using VMware as an example. The service name must be unique w/i the registered boot services. In this example it is: VM_DEB1 (also note that by default VMware is rather chatty on startup, so you must disable the startup dialog boxes to enable a non-interactive boot time start)
The critical information required is:
And there you have it. Try a reboot, you should see your new service providing whatever with the need for user intervention. You may also want to fiddle with the Recovery and Dependency service options as well as tweek the service for proper shutdown. (for example pulling the plug on a linux VMsession without shutting down linux is bad form...)