Friday, May 27, 2011

Run Application as a Windows Service

To allow an application to run as Windows Service under Windows 2008 you can use SrvAny.exe which is part of Windows 2003 Resource Kit.

1. Download Windows 2003 Resource Kit from
and extract it.
2. Copy SrvAny.exe into C:\Windows\System32
3. Create a service using SC command which start srvany.exe.
ex: create MyService binPath= C:\Windows\System32\srvany.exe DisplayName= "My Service"
4. Using the previous action MyService registy key has been created in Registry.
Open Registry using regedit and in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MyService create a Parameters key.
5. In Parameters create an String Value Application and enter the full path of the application.

Here is the example of making flcd4.exe to work as a service.
flcd4.exe is a daemon service from Floating License feature from 3D-Equalizer

Create  3D-Equalizer service using SC command:
SC create 3D-Equalizer binPath= C:\Windows\System32\srvany.exe DisplayName= "3D-Equalizer"

Go to services and change the Startup type to Automatic.

Open Registry using regedit and in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\3D-Equalizer create a Parameters key. Here create a String Value Application and enter the full path of the application: C:\3DEqualizer\3DE4_win32_r1b11\bin\flcd4.exe. Close the registry.

Go to services and start 3D-Equalizer.

and VoilĂ  it works!!

No comments:

Post a Comment