|
server
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
monitor process on remote host
I would like to know if process is running on remote machine. How could i do it? i wrote: strComputer = "192.168.8.122" procName = "ReqMgr.exe" SQLquery = "Select * from Win32_Process Where Name = '" & procName & "'" Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colProcesses = objWMIService.ExecQuery _ (SQLquery) Wscript.Echo SQLquery If colProcesses.Count = 0 Then Wscript.Echo procName & " is not running." Else Wscript.Echo procName & " is running." End If after running this script i have: Permission danied: 'GetObject' - i understand it bacause from local host i do not have permissions to remote hosr (192.168.8.122) How to change the script to have acces to that host? -------- Wojtek |
|||||||||||||||||||||||