Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Request administrator rights on Win Vista/7 from a c++ app

I found info on how to do it in c#, but how to make a C++ app pop-up that UAC "Run as administrator" when it is run?

like image 561
Marin Avatar asked May 27 '11 12:05

Marin


People also ask

How do I give admin rights in C#?

Right-click the C drive and select Properties. In the Properties box, select the Security tab and verify that the Administrator's group has full privileges. To set up C drive sharing with a specific account, select Sharing and click Advanced Sharing.

How do I debug as administrator in Visual Studio?

On the Windows desktop, right-click the Visual Studio shortcut, and then select Properties. Select the Advanced button, and then select the Run as administrator check box. Select OK, and then select OK again.


1 Answers

You can set the manifest in Visual Studio in:

Project >> Properties >> Configuration Properties >> Linker >> Manifest File >> UAC Execution Level.

like image 136
Mike Kwan Avatar answered Nov 15 '22 03:11

Mike Kwan