Ok, maybe I didn't explain myself correctly, I have been able to use the Win32::Daemon to create the service and it appears in the Services list as I would expect but it fails to run. I get an
Error 1053: The service did not respond to the start or control request in a timely fashion
I am not sure if this is due to the script I am using or if the actual Win::Daemon process is responsible.
I did a test with a very simple script below and get the same error. I am not sure what I am doing wrong
#! perl -slw
use strict;
use Win32;
open LOG, '>', 'c:\Mitel\ACD\service.log' or die;
select LOG;
$|++;
Win32::MsgBox( 'From test.pl at ' . localtime, 0, "test.pl" );
while( sleep 5 ) {
Win32::MsgBox( 'From test.pl at ' . localtime, 0, "test.pl" );
print scalar localtime;
}
close LOG;
|