MDGSF Software Engineer

[Windows] 程序自动获取管理员权限

2016-03-24

UAC.manifest 文件

把这个文件放在工程目录下

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity
        version="1.0.0.0"
        processorArchitecture="x86"
        name="Microsoft.Winweb.EthernetDirect"
        type="win32"
    />
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
          <requestedPrivileges>
            <requestedExecutionLevel level='requireAdministrator' uiAccess='false' />
          </requestedPrivileges>
        </security>
    </trustInfo>
</assembly>

24_01

24_02


weixingongzhonghao

上一篇 [Qt] DPI支持

Comments

Content