Here’s the idea, I’d like to make a service? that will look for a certain program starting up and dissallow it unless certain conditions are met.
Let’s say I have a game I want to stop myself from playing during the week. So if I start it up on any day other than Friday/Saturday/Sunday, it will intercept and cancel. Is this possible with C#?
Main thing I am looking for is how to catch a program starting up, rest should be easy.
Well, you can definitely determine which programs are running by looking for the process names you want (GetProcessesByName()) and killing them.
You could just have a list of them you didn’t want to run, do the time check (or whatever criteria was to be met) and then walk the list. I did something like this once for a test and it works well enough.