General information
Category:
Coding, syntax & commands
Hi
am using Win32_Process to kill a process which works fine. but i've problem in terminal services environment where it tries to kill processes of other users also. my question is how can i kill process of current user only ?
Thanks for the advise
[code]
m.loCIMV2 = GetObject("winmgmts://localhost/root/cimv2")
m.loProcesses = loCimv2.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'myapp.exe'")
For Each objProcess in loProcesses
objProcess.Terminate(0)
NEXT
[/code]
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only