by Uchiha Yueh (7 Submissions)
Category: Coding Standards
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (8 Votes)
Killing a process/program as easy as 1-2-3. No API, just as little piece of code.
Just sharing.
Enjoy!!
Dim Process
For Each Process In GetObject("winmgmts:"). _
ExecQuery("select name from Win32_Process where name='notepad.exe'")
Process.Terminate (0)
Next