If you have already compiled the script you do not need to use SRVANY. You can use the Win32::Daemon module to install the scripts as a service.
use Win32::Daemon;
%Hash = (
name => 'My Newly Compiled Perl Script',
display => 'This rocks!',
path => 'c:\path\to\the\compiled\script.exe',
user => '',
pwd => '',
parameters =>'if your exe requires any parameters or switches put them here.',
);
if( Win32::Daemon::CreateService( \%Hash ) )
{
print "Successfully added.\n";
}
else
{
print "Failed to add service: " . Win32::FormatMessage( Win32::Daemon::GetLastError() ) . "\n";
Hope this helps.
Trevor J. Joerges
<http://members.home.net/tjoerges>
________________________________
$_=q;$TTnzyUUifyIIz!;;s;z;xdl;g;
y;x;b;;y;B-x;A-w;s;y;y; ;;print;
________________________________
-----Original Message-----
From: Debbie Thomson [mailto:[EMAIL PROTECTED]]
Sent: March 7, 2001 08:08 PM
To: [EMAIL PROTECTED]
Subject: installing a Perl script as a service on NT
Hi, all-
Does anyone have any experience in installing a Perl script as a service
under NT? I have a script that I converted to an executable using
Perl2Exe. I'm trying to install it as a service under NT4 SP6a using
instsrv.exe and srvany.exe from the Resource Kit, but it does not start
my program. When I run my perl executable from a DOS prompt, it works
great.
Does anyone have any insight or suggestions for another way to
accomplish this?
Thanks much,
Deb
