solitaryrpr has asked for the wisdom of the Perl Monks concerning the following question:
Unfortunately, the Owner is ALWAYS empty (except for the backslash)...for my sanity, please help!use Win32::OLE; # PID of the target process $intPID = 1468; # ------ END CONFIGURATION --------- print "Process PID: $intPID\n"; $objWMIProcess = Win32::OLE->GetObject('winmgmts:\root\cimv2:Win32_Pro +cess.Handle=\'' . $intPID . '\''); print 'Name: ' . $objWMIProcess->Name, "\n"; print 'Command line: ' . $objWMIProcess->CommandLine, "\n"; print 'Description: ' . $objWMIProcess->Description, "\n"; print 'Exe Path: ' . $objWMIProcess->ExecutablePath, "\n"; print 'Parent Process ID: ' . $objWMIProcess->ParentProcessId, "\n"; $objWMIProcess->GetOwner($strUser, $strDomain); print 'Owner: ' . $strDomain . '\\' . $strUser, "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why doesn't GetOwner work?
by bsdz (Friar) on Jan 07, 2007 at 11:33 UTC | |
by solitaryrpr (Acolyte) on Jan 07, 2007 at 18:07 UTC |