How to code run-as-admin?
Soar
116
Reputation points
I've created a C# console app with Visual Studio to run cleanmgr, and it worked.
However, there are a couple of things which I failed to figure out:
- I couldn't find a way to run it as admin. Like what happened when I open an elevated cmd and run the command.
- The command I want is actually not cleanmgr, but "cleanmgr /d c". I couldn't code this.
I'd appreciate your help!