![]() Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Determine the Account a Process is Running Under
|
||
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colProcessList = objWMIService.ExecQuery _ ("Select * from Win32_Process Where Name = 'Winword.exe'") For Each objProcess in colProcessList objProcess.GetOwner strUserName, strUserDomain Wscript.Echo "Process " & objProcess.Name & " is owned by " _ & strUserDomain & "\" & strUserName & "." Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |