Skip to main content

How to run Windows applications as services

What are the advantages of running regular Windows applications as services? Plenty, particularly if your computer is shared by multiple users each having their own accounts. Turning applications into services will enable you to force these applications to run no matter who is logged-in into the computer. You will notice that critical Windows applications are always run as services; third party anti virus applications, firewalls, anti spywares etc are run as services too. Running applications as services has several benefits

  • Services always start even before a user logs on to Windows, unlike startup programs that launch only after a user session has begun. By the time a user logins and gets to access the desktop, the services are already running. This is ideal for user monitoring applications like parental control software, keyloggers etc.
  • Services can be executed with specified user rights and priority
  • Services automatically launch themselves after a Windows crash or reboot

In order to turn applications into services we will require two tools - Instsrv.exe, a service installer and Srvany.exe, which allows any Windows application to run as a service. Both these tools are a part of the Windows Server 2003 Resource Kit which contains plenty of other useful tools. If you don't want to download the whole pack, then you can download only the two required tools from here.

1. Copy both Instsrv.exe and Srvany.exe to C:\Windows\System32 folder.

2. Open command prompt (Start>Run>CMD) and issue the following command

C:\Windows\System32\Instsrv.exe Service Name C:\Windows\System32\Srvany.exe

services-cmd

This will create a service "Service Name" in the Services manager and set up  the necessary registry keys. Give a proper service name so that you can recognize the application.

3. Now open the Registry editor by typing regedit in the Run box. Navigate to this registry key.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\service name

From the Edit menu click New>Key and name it Parameters. Again from the Edit menu click New>String Value and name it Application. Right click on Application and click Modify. In the "Value data" field give the full path of the application you want to run as a service. After you are done, it should look like this

services-regedit

4. Close the registry editor and open Service Manager by typing services.msc in the Run box. There you will find your newly created service. You can now adjust the behavior of the service by clicking on Properties.

services

Comments

  1. u got a spelling error there. shouldnt it be "System32" instead of "Sysytem32"

    ReplyDelete
  2. There is a better application that does the same job with less settings and the good news is that it works in win 7.
    I personally use it on running Vibe Streamer and works flawlessly!

    ReplyDelete
  3. I've been trying to find a solution to do the same thing in Windows 7 - What is that applications ?

    Thanks

    ReplyDelete
  4. Thanks to you I successfully managed to make quietHDD run as a service every time I turn on my Asus 1215N!

    That HDD clicking sound was driving me crazy and I couldn't make quietHDD run automatically at every startup because it needs administrator rights to execute.

    Everything seems to be working fine so far.

    ReplyDelete
  5. You can also take a look at Application as Service (http://www.application-as-service.com/), this utility allows running any application as service and manage them with ease.

    ReplyDelete
  6. We use AlwaysUp on Windows 7
    http://www.coretechnologies.com/products/AlwaysUp/

    ReplyDelete
  7. hi, my custom service doesnt startup after i created it using Instsrv.exe..getting error 1053

    ReplyDelete
  8. services running, but the real application in not running... how it can be..

    ReplyDelete

Post a Comment

Popular posts from this blog

How to Schedule Changes to Your Facebook Page Cover Photo

Facebook’s current layout, the so called Timeline, features a prominent, large cover photo that some people are using in a lot of different creative ways. Timeline is also available for Facebook Pages that people can use to promote their website or business or event. Although you can change the cover photo as often as you like, it’s meant to be static – something which you design and leave it for at least a few weeks or months like a redesigned website. However, there are times when you may want to change the cover photo frequently and periodically to match event dates or some special promotion that you are running or plan to run. So, here is how you can do that.

69 alternatives to the default Facebook profile picture

If you have changed the default Facebook profile picture and uploaded your own, it’s fine. But if not, then why not replace that boring picture of the guy with a wisp of hair sticking out of his head with something different and funny?

How to remove watermark from an image or picture

A watermark is any recognizable text, logo or pattern that appears over an image to identify the owner of the image and generally used to prevent unauthorized reuse of the image. Watermarks are usually transparent and can be difficult to remove. The difficulty or ease of removal depends on the content of the image and the position, color, size etc of the watermark.