MFC opens the application as an administrator

In Solution Explorer, right click on the project, Properties
insert image description here
Configuration Properties —> Linker —> Manifest File —> UAC Execution Level —> requireAdministractor
insert image description here

Click OK, recompile and execute, and you will be prompted to ask for administrator privileges.
insert image description here
User account settings can be found in the control panel, path: Control Panel —> All Control Panel Items —> User Accounts —> Change User Account Control Settings

insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/chy555chy/article/details/125499111