Steven Manross wrote:
I'm pretty sure that means you have a compile error (or at least that happens to me when I have a compile error)..
Run
perl -c script.pl
And fix any issues. :)
C:\Programme\Serv-Int-Programme>perl -c winupdate_local.pl winupdate_local.pl syntax OK
When I start the script from command line it runs fine. It's just running it as a service.
Alex
Steven -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alexander Apprich Sent: Wednesday, October 29, 2003 5:44 AM To: [EMAIL PROTECTED] Subject: Error while starting service
Hi there,
I got stuck again. I wrote the follwoing script to install a perl script as a service. Install/Uninstall works fine, but I'm not able to start the service. The Error Code I run into is 2186 (I'm working on a german Win2K-Box so please see "net helpmsg 2186" for details :-)).
As you can see I try to run the service as a different user then Admininstator.
Any help/hint is greatly appreciated!
Alex
# Interpreter: C:/Programme/Perl/bin/perl.exe
use Win32::Daemon;
$sidir = "C:\\Programme\\Serv-Int-Programme"; $file = "$sidir\\winupdate_local.pl"; $Machine = "\\\\" . Win32::NodeName(); Win32::Daemon::Timeout( 90 );
%ServiceConfig = ( name => 'scwinupdate', display => 'sc Windows Update Service', path => 'C:\\Programme\\Perl\\bin\perl.exe', user => '.\serv-int', password => 'perl', parameters => $file, depedencies => [], );
if ($installflag eq "i") {
if ( Win32::Daemon::CreateService( \%ServiceConfig ) ) { print "$ServiceConfig{display} successfully installed\n"; }else{ print "$ServiceConfig{display} could not be installed\n"; print "Error: "; print Win32::FormatMessage( Win32::Daemon::GetLastError() ), "\n"; } }elsif ($installflag eq "u" ) { if ( Win32::Daemon::DeleteService( $Machine, $ServiceConfig{name} ) ) { print "$ServiceConfig{display} successfully uninstalled\n"; }else{ print "$ServiceConfig{display} could not be uninstalled\n"; print "Error: "; print Win32::FormatMessage( Win32::Daemon::GetLastError() ), "\n"; } }
-- _________________________________creating IT solutions Alexander Apprich science + computing ag IT-Services Hagellocher Weg 71-75 phone +49(0)7071 9457-291 D-72070 Tuebingen, Germany fax +49(0)7071 9457-211 www.science-computing.de
_______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
