Popcorned1 Posted February 26, 2006 Share Posted February 26, 2006 (edited) 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 February 26, 2006 by Popcorned Link to comment Share on other sites More sharing options...
nomis_nehc Posted February 26, 2006 Share Posted February 26, 2006 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? Link to comment Share on other sites More sharing options...
Popcorned1 Posted February 26, 2006 Author Share Posted February 26, 2006 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. Link to comment Share on other sites More sharing options...
medium_pimpin Posted February 26, 2006 Share Posted February 26, 2006 Running an app as a service is especially helpful on servers, where a program may need to run even if no users have an active session. Link to comment Share on other sites More sharing options...
tony-inpo Posted February 26, 2006 Share Posted February 26, 2006 Nice one I think just about every programmer asks this question at one time or another Edit> This first 'HERE' link doesn't do anything Link to comment Share on other sites More sharing options...
shooter468 Posted February 26, 2006 Share Posted February 26, 2006 srvtools can be found here srvtools.zip Link to comment Share on other sites More sharing options...
Popcorned1 Posted February 26, 2006 Author Share Posted February 26, 2006 That's wrong Shooter, updated the original topic with the link. Cheers! :D Link to comment Share on other sites More sharing options...
shooter468 Posted February 26, 2006 Share Posted February 26, 2006 oops... :blush: Link to comment Share on other sites More sharing options...
DigeratiPrime Posted February 26, 2006 Share Posted February 26, 2006 (edited) 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 February 26, 2006 by DigeratiPrime Link to comment Share on other sites More sharing options...
DaveLegg Developer Posted February 26, 2006 Developer Share Posted February 26, 2006 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. Link to comment Share on other sites More sharing options...
Popcorned1 Posted February 26, 2006 Author Share Posted February 26, 2006 Lets have a looksy, oh look a error Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Servicename\Parameters] "Application"="\"D:\\Program Files\\Winpooch-0.5.10\\Winpooch.exe\"" Replace that with Winpooch Try now. Link to comment Share on other sites More sharing options...
DigeratiPrime Posted February 26, 2006 Share Posted February 26, 2006 its working! :) Link to comment Share on other sites More sharing options...
jimbo12141 Posted February 26, 2006 Share Posted February 26, 2006 woot thanks for the guide! Link to comment Share on other sites More sharing options...
OxideNOS Posted February 27, 2006 Share Posted February 27, 2006 Will be helpful for my FTP Server. Thanks a lot for a great guide. Link to comment Share on other sites More sharing options...
WepX Posted February 27, 2006 Share Posted February 27, 2006 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 Link to comment Share on other sites More sharing options...
Popcorned1 Posted February 27, 2006 Author Share Posted February 27, 2006 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 :( Link to comment Share on other sites More sharing options...
Banzai Posted February 27, 2006 Share Posted February 27, 2006 I keep getting an error something about the service did not respond in a timely manor Link to comment Share on other sites More sharing options...
WepX Posted February 27, 2006 Share Posted February 27, 2006 ok thanks popcorned :) was worth a try :yes: Link to comment Share on other sites More sharing options...
GrimReapa Posted March 3, 2006 Share Posted March 3, 2006 Is it possible to use this method to run a perl script as a service? Link to comment Share on other sites More sharing options...
cga Posted March 4, 2006 Share Posted March 4, 2006 Or you could just download this. Works very well and is extremly easy to use. Link to comment Share on other sites More sharing options...
Victor V. Posted March 17, 2006 Share Posted March 17, 2006 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 Link to comment Share on other sites More sharing options...
Recommended Posts