All,
I am trying to obtain the status of all processes on a win2k workstation,
I have the following code
dim state
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2"
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process"
For Each objProcess in colProcessList
colProperties = objprocess.name
state = objprocess.ExecutionState
msgbox colproperties & " " & state
Next
However it always returns null - I am expecting 1-6 am I missing the point
Steve
I am trying to obtain the status of all processes on a win2k workstation,
I have the following code
dim state
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2"
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process"
For Each objProcess in colProcessList
colProperties = objprocess.name
state = objprocess.ExecutionState
msgbox colproperties & " " & state
Next
However it always returns null - I am expecting 1-6 am I missing the point
Steve