[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SrvAny\Parameters] "Application"="\\perl\\bin\\wperl.exe \\test\\service.pl" #### #! perl -slw use strict; use Win32; open LOG, '>', 'c:\test\service.log' or die; select LOG; $|++; Win32::MsgBox( 'From service.pl at ' . localtime, 0, "Service.pl" ); while( sleep 5 ) { Win32::MsgBox( 'From service.pl at ' . localtime, 0, "Service.pl" ); print scalar localtime; } close LOG;