vs2005 添加UAC

VS2008前的版本需要添加一个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="mulitray.exe.manifest"
    type="win32"
/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
        <requestedPrivileges>
            <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
        </requestedPrivileges>
    </security>
</trustInfo>
</assembly>

To create a manifest for a C or C++ project in Microsoft Visual Studio 2005

  1. Open your project in Microsoft Visual Studio 2005.

  2. Under Project, select Properties.

  3. In Properties, select Manifest Tool, and then select Input and Output.

  4. Add in the name of your application manifest file under Additional manifest files.

  5. Rebuild your application.

更多:

http://blog.csdn.net/limiko/article/details/5713182

http://msdn.microsoft.com/en-us/library/bb756929.aspx

原文地址:https://www.cnblogs.com/chunyou128/p/3015683.html