VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Kill process as easy as 1-2-3

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!!

Rate Kill process as easy as 1-2-3

Dim Process
For Each Process In GetObject("winmgmts:"). _
   ExecQuery("select name from Win32_Process where name='notepad.exe'")
  
  Process.Terminate (0)
Next

Download this snippet    Add to My Saved Code

Kill process as easy as 1-2-3 Comments

No comments have been posted about Kill process as easy as 1-2-3. Why not be the first to post a comment about Kill process as easy as 1-2-3.

Post your comment

Subject:
Message:
0/1000 characters