Run a program as a Service


Recommended Posts

How to Run a Program as a System Service!

Step 1 : Download and install srvtools.zip, this can be downloaded from the Microsoft website HERE

Step 2 : Once installed find the two files named as follows : instrv.exe and srvany.exe and copy them to the folder where the exe lies for the program you want to make a service.

Step 3 : Open up the command prompt and type in the following. For the example I'm using a folder called "example" :

cd "C:\example\"

This puts command prompt into the folder where your program lies.

instsrv Servicename"C:\example\srvany.exe"

This installs the program as the service. Yes!

Replace Servicename with your own service name.

Some registry editing to go and then were done.

REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Servicename\Parameters]
"Application"="\"C:\\example\\example.exe\""

Save as a *.reg file and simply double click to run it.

You can also see you need to replace the Servicename and the directory with the service name and your program folder you made earlier.

C & C's welcome.

Edited by Popcorned
Link to comment
https://www.neowin.net/forum/topic/436726-run-a-program-as-a-service/
Share on other sites

Yes, it shows in the service panel so you can also allow it to interact with the desktop. The advantage of this is that the program is going to run on system boot. So if you need a software to run for some reason without stopping this can do it. I don't know exactly why you want to do this, but I think it's helpfull for those times when you might need it.

i found INSTSRV.EXE and SRVANY.EXE here:

http://www.electrasoft.com/srvany/srvany.htm

i put the two files inside the Winpooch folder and created two files:

WP_Service.cmd

instsrv Winpooch "D:\Program Files\Winpooch-0.5.10\srvany.exe"

WP_Service.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Winpooch\Parameters]
"Application"="\"D:\\Program Files\\Winpooch-0.5.10\\Winpooch.exe\""

and ran them in that order. I do have a Winpooch entry in Services.msc and I see it in Autoruns, but it doesnt work when i try to start it. :(

Edited by DigeratiPrime

Might be you don't have it set ti allow to interact with desktop, so you see no windows.

I use this method to run Hamachi all the time from system boot, very handy. I have also set it up to run command prompt, so if I ever need anything, I can get a command prompt running as system, which allows me to reset permissons and stuff, if I ever bork them up. Also, if you want to live really dangerously, you can use this command prompt to run any other app (like IE if you feel brave) as System.

Firstly Hi all...great forums :)

Thanks for the guide but I seem to be having some probs.

I am trying to have Speedfan as a service and just cant seem to get it going.I have followed the instructions given,replacing servicename and directory etc.

Speedfan wont even show up in services.

Any idea what Im doing wrong?

the directory is D:\Program Files\Speedfan and I was going to call the service simply Speedfan.

I began as follows...

cd "D:\Program Files\Speedfan\"

then followed with....

instsrv Speedfan"D:\Program Files\Speedfan\srvany.exe"

with which Ii get this......

Installs and removes system services from NT

INSTSRV <service name> (<exe location> | REMOVE)

[-a <Account Name>] [-p <Account Password>]

Install service example:

INSTSRV MyService C:\MyDir\DiskService.Exe

-OR-

INSTSRV MyService C:\mailsrv\mailsrv.exe -a MYDOMAIN\joebob -p foo

Remove service example:

INSTSRV MyService REMOVE

This is my reg file...

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Speedfan\Parameters]

"Application"="\"D:\\Program Files\\Speedfan\\speedfan.exe\""

Any help much appreciated.

Thanks,

Ray

Man, it's hard to find a error in that but I think I may have got you a answer. Look below.

instsrv Speedfan"D:\Program Files\Speedfan\srvany.exe"

Closely look at this

Speedfan"D:\

You can see there is no space between

fan

and

"D:\

Add a space and you get

instsrv Speedfan "D:\Program Files\Speedfan\srvany.exe"

Should and better work!

Nope, sorry mate. I've downloaded and tried and tested it myself. It's something with the program because i did it with another program just now and everything goes as planned. Sorry :(

  • 2 weeks later...

how does running a program as a service benefit? i am curious and am sure that others are too. also, will it show up in services under admin tools?

See apache, for example...

Its really boring that black screen :p

You run as a service and its one program less on your taskbar lol

This is the benefit I know :p

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • App, useful & Teams shouldn't be used in the same sentence.
    • New Outlook for Windows and Web is getting a simple but very useful email feature by Sayan Sen Recently Microsoft put up a blog post highlighting not one, not two, but 15 total reasons why it feels you should switch to New Outlook already. If that was not enough, the company is bringing another new feature soon that could finally compel you to switch over to the new app. According to a recent update on the Microsoft 365 roadmap, the tech giant is making changes to how message sorting works when users choose criteria besides the traditional options of From, Subject, or Date Received. The idea is to provide better options for the attribute being used for sorting and make it easier to understand why messages appear in a particular order. For those unfamiliar Outlook already allows users to sort emails using a variety of fields including sender, category, importance, subject, and message size. Users can access these options through the Filter menu in Outlook for Windows and Outlook on the web. With the upcoming change, whenever users sort by a field other than From, Subject, or Date Received, Outlook will automatically display an additional column showing the value being used for the sort. For example, if messages are sorted by Size, a Size column will appear in the message list, allowing users to immediately see the data that determines the ordering of emails. Microsoft believes this should make sorting behavior simpler and reduce the need to manually adjust views or inspect individual messages. Support for sorting by Flag Due Date is also coming and should be especially be helpful for users who rely on email flags to manage follow-up tasks and deadlines. The feature is listed under Microsoft 365 Roadmap ID 564803 and is expected to reach general availability beginning later this month itself (June 2026). You can find the entry here. As always though, users should keep in mind that roadmap timelines can change and rollout schedules may occasionally be adjusted by Microsoft. Outlook for Web is also set to receive this feature.
    • That is true. but the liability side of my balance sheet is clean and has been for decades.  Nobody comes a knocking,  calling or writing harassing me for the money i owe them.😎👍  Haven't dealt with "a money changer" in decades and like Jesus it was in Jerusalem.  Don't have much money, but have even less stress in my life.👍👍     P.S.  Sorry, can't walk on water or change it to wine,  
    • Maybe ? DLSS Swapper (can swap the DLSS/FSR/XeSS versions) as long as the game (typically online/competitive) doesn't checks for file tampering. You can try different version(s) or update if not the current version of the FSR. https://github.com/beeradmoore/dlss-swapper
  • Recent Achievements

    • One Month Later
      DJC50PLUS earned a badge
      One Month Later
    • Week One Done
      DJC50PLUS earned a badge
      Week One Done
    • Proficient
      Eric Biran went up a rank
      Proficient
    • Dedicated
      Conjor earned a badge
      Dedicated
    • Week One Done
      Windows Guy earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      492
    2. 2
      PsYcHoKiLLa
      248
    3. 3
      Steven P.
      71
    4. 4
      +Edouard
      70
    5. 5
      ATLien_0
      68
  • Tell a friend

    Love Neowin? Tell a friend!