Hi,
I am not able to start a service in my machine using the below code
#!/usr/bin/perl
use strict;
sub StartServ
{
$computername = '';
$servicename = 'ProtectedStorage';
Win32::Service::GetStatus("\\\\".$computername, $servicename, \%s
+tatus);
die "service is arealdy started\n" if ($status{CurrentState} == 4
+);
Win32::Service::StartService("\\\\".$computername,$servicename) |
+| die "Can't start service\n";
print "Service started\n";
}
Error:-
Global symbol "$computername" requires explicit package name at xxx.pl line 6
Global symbol "$servicename" requires explicit package name at xxx.pl line 7.
When I tried downloading the Service module which cantails packages, i am not able to execute it.
please provide me the steps to execute and run the module..
Thanks