Just getting into this. Trying to change the start mode
on the messenger service to 'auto'. Doesn't seem to work.
What's wrong? I get all the information - seems to work just
fine except for the Put. Thanks
I have all the rights to do this.
# Get the wmi service object.
my $wmi;
if (!($wmi = Win32::OLE->GetObject(
"winmgmts:{impersonationLevel=impersonate}!//${computerName}/root/CIMV2")))
{
# Do error stuff
}
my $msg;
if (!($msg = $wmi->Get("Win32_Service='Messenger'"))) {
# Do error stuff
}
my $name = $msg->{Name};
my $startMode = $msg->{StartMode};
my $state = $msg->{State};
my $status = $msg->{Status};
print qq/ Computer: $computerName\n/;
print qq/ Name: $name\n/;
print qq/Start Mode: $startMode\n/;
print qq/ State: $state\n/;
if ($startMode =~ /Disabled/io) {
print qq/Here\n/;
$msg->{StartMode} = 'Auto';
$msg->Put();
}
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs