Windows Form C# run a command with admin rights without typing credentials

LiLou 0 Reputation points

Hello everyone,

So I'm an IT admin and some users have been complaining about their computer running slower and slower each time : turns out it comes from the "Quick Start" feature (I think it's exclusive to Lenovo) that keeps the processor up when you want to turn it down.

I figured out you can use "powercfg /h off" as an admin to disable this option (or "Powercfg /h on" to turn it on)

So I wanted to make a Windows Form program with two buttons to enable/disable the Quick start, but you need to be an admin to run this command.

That's why I wanted to know if there is a way to do this program so the users can choose if they want to disable or not the Quick Restart without me typing the admin credentials each time.

Thank you!

A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
3,068 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
8,998 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 77,501 Reputation points

    You could add a Manifest file with


    instead of