KB-38178: Closing a computer's process via E3
Question:
Can I close a computer's process via E3?
Solution:
To do so, you must write a script. For example:
ProcessName = "notepad.exe"
PID = 2536
Set service = GetObject("winmgmts:\\.\root\cimv2")
'Closes the process via PID (Process ID)
'Set results = service.ExecQuery(" Select * from Win32_Process where ProcessId ='" & PID & "'")
'Closes by the process' name
Set results = service.ExecQuery(" Select * from Win32_Process where Name ='" & ProcessName & "'")
for each obj in results
obj.Terminate()
'exit sub
next
Related Articles
No related articles were found.
Attachments
No attachments were found.
Visitor Comments
No visitor comments posted.
Post a comment
Post Comment for "KB-38178: Closing a computer's process via E3"
To post a comment for this article, simply complete the form below. Fields marked with an asterisk are required.