In later versions of Windows in Vista, there are times when you need to elevate the post-build program's permissions to let the generated program run as an administrator. Although in general, you can use the right mouse button to choose the way to run as an administrator, but it does not block the normal running mode, and ordinary people usually do not use right-click to run as an administrator, so the program must be built to restrict the program to run as an administrator.
To put it simply, in the later versions of Windows, Microsoft introduced the UAC mechanism, which is designed to prevent the program from maliciously tampering with the operating system itself. For a program to run as an administrator, you need to introduce UAC annotations in your program, which means that the program displays "UAC Shields."
VS2008 set the application chain to be delivered to UAC settings: Linker->manifest File
UAC execution Level Optional parameters:
0: asInvoker: The application will run with the same permissions as the process that started it. You can promote the application to higher permissions by selecting Run as Administrator.
1: highestavailable: The application will run with the highest possible permission level. This option is the same as Requireadministrator if the user who launches the application is a member of the Administrators group. If the highest permission level available is higher than the level of the open process, the system will prompt for credentials.
2: requireadministrator: The application will run with administrator privileges. The user who launches the application must be a member of the Administrators group. If the open process is not running with administrative rights, the system will prompt for credentials.
/MANIFESTUAC (embedding UAC information in the manifest)
Windows Application Run Permissions settings