I need to determine if my program is running with full administrator rights. By that I mean if uac is turned on (for win vista/7) that I need to determine if the program actually has admin rights (like if the user right clicked and selected "run as administator") and not limited by uac. How do I do this in C++?
Start Task Manager and switch to the Details tab. The new Task Manager has a column called "Elevated" which directly informs you which processes are running as administrator. To enable the Elevated column, right click on any existing column and click Select columns. Check the one called "Elevated", and click OK.
Use Your Device's SettingsApps & notifications > Advanced > Special app access > Device admin apps. Security > Device admin apps. Security & privacy > Device admin apps.
Other alternatives are: IsUserAnAdmin or AccessCheck
Checking the TOKEN_ELEVATION* stuff in the token is not required for testing the current process but it is useful if you need to find out if the user could elevate because they have a split token etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With