nullifier
nullifier

Reputation: 1

Kill specific process in vb.net

I'm writing a program for my school, which is supposed to terminate some processes opened by user, like for example taskmgr, or regedit etc. How to do it? I know files names, and I'm not sure how to get their PIDs.

For example, nasty student want to bypass security program which is blocking "adult" sites, or chans etc. And now I have to block executing files - only two of them - I mean taskmgr and regedit.

Upvotes: 0

Views: 4253

Answers (1)

The Blue Dog
The Blue Dog

Reputation: 2475

You don't need to get the PID, it doesn't really get any easier than this ...

For Each proc As Process In Process.GetProcessesByName("taskmgr")
    proc.Kill()
Next

Upvotes: 1

Related Questions