Question:
Can I close a computer’s process via E3?
Solution:
Yes. 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