Installing a service tells win32 where to find the executable. The executable is actualle Perl. Therefore this $^X. The script that actually implements the service is a parameter to Perl. The code implements service.pl as the service controller: it is capable of installing, removing, starting etc. the script. Furthermore, service.pl is the service itself if it is invoked with the --run parmater. The code
parameters => ( sprintf '"e:/dia/temp/service.pl" --run', $scriptPath,
+ $script ),
is actually misleading, because the path and script are hard-coded. Hence, you can write it as
parameters => '"e:/dia/temp/service.pl" --run'
The start_type tells the win32 service manager to automatically start-up the script. This means, no user must be logged in. This latter thing is actually one of the main reasons to use services on win32. | [reply] [d/l] [select] |