Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

C# How to check if a process is a windows service/process or a normal process?

TableFlipGod

Bronze Coder
So, currently i'm coding a program that has gaming mode (it kill UN-necessary programs that cause CPU usage, ram, GPU ETC. ) it should help with fps especially on a low end system!

How would i check if it is from the OS or not?
 
You would want to check who is running the process. If the user is SYSTEM, then don't kill it. There are a few other special system users that you don't want to kill. A good strategy might be to kill processes that are being run by the user with the username of the current account. i.e., if my windows username is simple then kill the processes whose user is simple. These programs should be ones that I either started myself or they started when I logged in (via a configuration option I set).

You may also want to do basic heuristics and check the memory and CPU usage, as there is really no point in killing processes that aren't hurting anything.
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom