I have done this a few times. The key is the getting the environment you
need built in the script or configure the default system environment as
needed. I used the same rekit programs you mentioned to install a server
monitor script as a service.
As an example, the following is from the registry creating the service
Service keys built by instsrv
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASGMonitor]
"Type"=dword:00000010
"Start"=dword:00000003
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):63,00,3a,00,5c,00,77,00,69,00,6e,00,6e,00,74,00,5c,00,73,
00,\
79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,72,00,76,00,61,00,6e,\
00,79,00,2e,00,65,00,78,00,65,00,00,00
"DisplayName"="ASGMonitor"
"ObjectName"=".\\administrator"
"Description"="ASG network monitor by Bobby Brown"
Parameters added
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASGMonitor\Parameters]
"Application"="h:\\perl\\bin\\perl.exe"
"AppParameters"="c:\\asgmonitor\\asgmonitor.pl c:\\asgmonitor\\asgnet.txt"
"AppDirectory"="c:\\asgmonitor"
The other keys were default by the instsrv program. I originally had a
problem with the "include" path being lost and had to add the path in the
script.
Does the Perl2Exe make a complete standalone executable or is the perl
environment still needed? If the environment is needed, I quest when the
service tries to start, some variables can not be found. What account is the
service started as?
Bobby Brown
-----Original Message-----
From: Debbie Thomson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 07, 2001 7: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
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin