Srvany.exe: Applications as Services Utility Topics | Previous | Next
To specify an application to run as a service, you must use a registry editor to add information to the Windows registry. You also have the option of setting any required startup parameters to run the application, as well as setting the working directory used by the application.
Caution
Do not use a registry editor to edit the registry directly unless you have no alternative. The registry editors bypass the standard safeguards provided by administrative tools. These safeguards prevent you from entering conflicting settings or settings that are likely to degrade performance or damage your system. Editing the registry directly can have serious, unexpected consequences that can prevent the system from starting and require that you reinstall Windows 2000. To configure or customize Windows 2000, use the programs in Control Panel or Microsoft Management Console (MMC) whenever possible.
Note
None of the strings mentioned in the following examples are case-sensitive.
Application: REG_SZ: D:\Tools\Vi.exe
Use one of the following to set specific start parameters.
AppParameters: REG_SZ: C:\Tmp\EXAMPLE- Or -
D:\\Binp\\B.exe C:\\Tmp\\EXAMPLE
Note You must type two backslashes (\\) to specify a single backslash (\).
For more information, see "Programming Considerations,".
Use one of the following to set a working directory.
AppDirectory: REG_SZ: C:\Tmp
/D C:\\Tmp D:\\Tools\\Vi.exe C:\\Tmp\\EXAMPLE
Note
Use Services only when the service is configured to be started manually, not when it is started by the system. If the target application is usually the same each time you run the service, specifying it in Services is less convenient than entering these parameters in the registry, because you must type the parameters each time the service is started. However, if the target application is usually different each time the service is started, using the Services method might be more convenient.