Hi,
I have a service written with Win32::Daemon that sets a dependency on
the WMI service. The hash looks like this:
my %ServiceHash = (
name => "SystemsAppInstallation",
display => "SystemsAppInstallation",
dependencies => [ "winmgmt" ],
user => "",
password => "",
parameters => "C:\\Build\\InstallAppsService.pl -run",
path => $^X,
service_type => SERVICE_WIN32_OWN_PROCESS |
SERVICE_INTERACTIVE_PROCESS,
);
this works perfectly - the service installs as expected. Now I'm trying
to add a second dependency as follows:
my %ServiceHash = (
name => "SystemsAppInstallation",
display => "SystemsAppInstallation",
dependencies => [ "winmgmt", "lanmanworkstation" ],
user => "",
password => "",
parameters => "C:\\Build\\InstallAppsService.pl -run",
path => $^X,
service_type => SERVICE_WIN32_OWN_PROCESS |
SERVICE_INTERACTIVE_PROCESS,
);
and have run into problems. The dependency is now created incorrectly
as:
winmgmts
lanmanwork
tation
ie the "s" is replaced by a null character. Export with regedit of the
DependOnService value gives the following:
"DependOnService"=hex(7):77,69,6e,6d,67,6d,74,00,6c,61,6e,6d,61,6e,77,6f
,72,6b,\
00,74,61,74,69,6f,6e,00,00
Editing it to the correct value and then exporting yields this:
"DependOnService"=hex(7):77,69,6e,6d,67,6d,74,00,6c,61,6e,6d,61,6e,77,6f
,72,6b,\
73,74,61,74,69,6f,6e,00,00
Has anyone else come across this bizarre bug in Win32::Daemon? I found
one reference to it here:
http://www.mail-archive.com/[email protected]/ms
g08350.html
Not sure whether Dave Roth is currently maintaining the module or not
but I'll send a copy of this mail to him.
I guess I can get around it by editing the depency field using
Win32::TieRegistry directly after installation, but it's a bit messy...
Cheers
Paul
*****************************************************************
Gloucester Research Limited believes the information
provided herein is reliable. While every care has been
taken to ensure accuracy, the information is furnished
to the recipients with no warranty as to the completeness
and accuracy of its contents and on condition that any
errors or omissions shall not be made the basis for any
claim, demand or cause for action.
The information in this email is intended only for the
named recipient. If you are not the intended recipient
please notify us immediately and do not copy, distribute
or take action based on this e-mail.
Gloucester Research Limited, 5th Floor, Whittington House,
19-30 Alfred Place, London WC1E 7EA
*****************************************************************
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs