sub get_wmi {
my $self = shift;
my $name = $self->name or do {
warn("Cannot return WMI handle for anonymous workstation.\n");
return 0;
};
use Win32::OLE ;
my $wmi = Win32::OLE->GetObject( "winmgmts:{impersonationLevel=impersonate,(security)}//$name");
if ($wmi) {
return $wmi;
}else{
return 0;
}
}
You should then be able to do $wmi->CreateProcess("your.exe") or whatever (see MSDN.microsoft.com for details of WMI)...
Or Google for "perl+WMI" - or visit www.roth.net/perl/scripts
In reply to Re: Re: Running exe's remotely
by Anonymous Monk
in thread Running exe's remotely
by wahoowa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |