Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Beatnik (493)

  (email not shown publicly)

A 29 year old belgian who likes Mountain Dew, Girl Scout Cookies, Tim Hortons French Vanilla Flavoured Cappucinno, Belgian beer, Belgian chocolate, Belgian women, Magners Cider, chocolate chipped cookies and Perl. Likes snowboarding, snorkling, sailing and silence. Bach can really cheer him up! He still misses his dog.

Project Daddy of Spine [], a mod_perl based CMS.

In his superhero time (8.30 AM to 5.30 PM), he works on world peace.

Journal of Beatnik (493)

Friday March 07, 2008
05:23 PM

Perl script as Windows service

[ #35865 ]
I needed this stuff a couple of times but never took the time to document it properly.. Summarized: Use a binary from Microsofts Resource Kit as a called to perl. KB article here.

Copy the executable files to the system path (or wherever you see fit within the path)

copy INSTSRV.EXE C:\Windows\System32
copy SRVANY.EXE C:\Windows\System32

Create a service called SERVICENAME and point it to SRVANY.EXE that you copied to the system directory.


Open the Registry Editor (regedit) and look for


Right click on the SERVICENAME in the left column and add a new string value named Description. Double-click on Description and set the value to SERVICENAME DESCRIPTION.

Right click on the SERVICENAME in the left column and add a new key named Parameters. Click on Parameters and add a new String Value called Application. Double-click on Application and set the value to

C:\Perl\bin\perl.exe "SCRIPTLOCATION"

Close the Registry Editor. The service show now show up in your Services panel in the Control Panel > Administrative Tools. Change the startup mode from Manual to Automatic if needed.

SERVICENAME is whatever you want your service to be called, SERVICENAME DESCRIPTION is whatever you want listed as a description for this service and SCRIPTLOCATION is the path to your script.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.