Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Killing process
Message
From
03/07/2008 19:27:21
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Killing process
Miscellaneous
Thread ID:
01328909
Message ID:
01328909
Views:
70
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
Map
View

Click here to load this message in the networking platform