Run Application as Windows 2008 Service

Run Application as Windows 2008 Service



  1. Download Windows 2003 Resource Kit from Microsoft
  2. Install the the Windows 2003 Resource Kit into any workstation or even Windows 2008 server. We only need the SrvAny.exe file from the resource kit
  3. Copy SrvAny.exe in C:\Windows\System32 of Windows 2008 Server
  4. Use “sc ” to create a new service that launches “srvany ” (e.g. sc create MyCustomService binPath= C:\Windows\System32\srvany.exe DisplayName= “My Custom Service” )
  5. Using RegEdit : create a “Parameters ” key for your service (e.g. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MyCustomService\Paramaters\ )
  6. Using RegEdit : within the newly created “Parameters ” key , create a string value called “Application ” and enter the full path to the application you are wanting to run as a service. (No quotes required.)


Below is the steps to make Inadyn (Simple Dynamic DNS client) to run as service

1. Download inadyn (for OpenDNS, please download from

2. Extract inadyn into c:\inadyn and do the necessary configuration by editing inadyn.conf

3. Copy SrvAny.exe from fron Windows 2003 Resource Kit into C:\Windows\System32

4. Create the service by the following command in command prompt

sc create inadyn binPath= c:\Windows\System32\srvany.exe DisplayName= inadync start= delayed-auto

5. Adjust the registy key. Below is the sample registry file. Just save the following content into anyfile.reg and then double-click to file to import it into registry.

; Edit the next line to show the full path to the inadyn.exe executable file. Note that any backslashes “\” in the path must be _doubled_ “\\”
; Edit the next line to replace “username” and “password” with your OpenDNS user name and password. The “–alias” string is arbitrary, and is really only relevant to more complex setups
“AppParameters”=”–input_file C:\\inadyn\\inadyn.conf”

6. Completed. You should be able to see th inadyn in the Windows Services.