Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an executable that doesn't require any interaction with the user and I want to install it as a Windows service; what do I need to have and do to make that happen?

  • I didn't write the app; I don't have the source and not willing to have it.
  • It's not a .Net app; can't use InstallUtil.exe
  • I'm on Windows 7 and Windows Server 2008
share|improve this question
up vote 6 down vote accepted

I don't know about Windows 7, but the SC and SrvAny utilities from the Windows Server 2003 resource kit still worked on Server 2008 the last time I checked; I've used this technique myself to get PDFCreator running as a service on our file/print box:

  • Grab "srvany.exe" from the Server 2003 Resource Kit and copy it to your Server 2008 box.

  • Use "sc" to create a new service that launches "srvany":

sc create NewService binPath= C:\Windows\System32\srvany.exe DisplayName= "My Custom Service".

(Those spaces between the equal sign and the value are actually required by SC. No, I don't know why either.)

  • Use Regedit to create a key called "Parameters" in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NewService\Parameters). Inside that key, create a string value called "Application" and enter the full path to the application you are wanting to run as a service.

  • Cross fingers, start service.

share|improve this answer
So the answer is "No, but there is a workaround" :) Anyway, I'll mark this as an answer because it worked in my case. – TheBlueSky Sep 3 '11 at 6:12

Srvany will do the basic job of running your executable as a service but be careful as it falls short in some areas. Check out this page comparing Srvany to our commercial alternative for the details.

share|improve this answer
AlwaysUp guys has their own console to create and monitor services and not doing it from Windows Services console, which is a minus for me; plus, it's too expensive for my need. – TheBlueSky Sep 3 '11 at 6:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.