Edi Wang

Microsoft MVP for Azure

Process

Search and Destroy Process using C#

Recently, I saw an exam system that has a feature to monitor the process. As soon as prohibited software such as Communicator.exe is found, the process is immediately killed and reported to the server. I looked into it a little bit, and this feature is actually quite simple to implement. It is to use ManagementObjectSearcher to get a list of processes, then put them in a Collection, and then you can do it according to your own logic. Here's an example: get a list of processes, create a list of "banned" processes, find and kill processes. Note that you need to add a reference to System.Management in your project first.
C# Process