How to blacklist/whitelist process while running application (C#)

2268 views c#

I am programming video player with C# and WPF. And try to do 2 things 1. Blacklist screen recording program => Don't allow users to open any Blacklist process while running my video player application. 2. Whitelist => Only allow some processes that can open while running my video player application. ex. mspaint, notepad, calculator, etc.

Sorry for my poor English but please help! Thank you in advance.

answered question

You can't. Your program does not have the right to do that. Even if you elevate privileges to do so, there are about a thousand ways around your "security". You could however try to create a HdcpSession which is an OS level concept to prevent copying of your video...

I saw one application can do it. It close itself when detect blacklist process open while running application.

1 Answer


You can shut down your application based off your blacklist / whitelist rules:

Get running processes in C#:

How can I list all processes running in Windows?

Programmatically shut down a WPF application:

How do I exit a WPF application programmatically?

posted this

Have an answer?


Please login first before posting an answer.