Below is code,
if you use "." for strComputer, it will fetch the details of the local machine.
If you want to fetch the list of process running in a remote machine, use the machine id in place of ".".
E.g.:
Hope this helps...
Thanks,
Elango
if you use "." for strComputer, it will fetch the details of the local machine.
If you want to fetch the list of process running in a remote machine, use the machine id in place of ".".
E.g.:
Code:
strComputer = "REMOTE-MACHINE100"
--
Dim Process, strComputer
Process = ""
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colProcess = objWMIService.ExecQuery _
("Select * from Win32_Process")
count = 0
For Each objProcess in colProcess
Process = Process + vbnewline + objProcess.Name
count = count + 1
Next
Print Process
Set objWMIService = Nothing
Set colProcess = NothingHope this helps...
Thanks,
Elango

