Loading... **1.建立 res 文件** 建立一个文本文件,名字可以自己起,如UAC.manifest,内容: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator"/> </requestedPrivileges> </security> </trustInfo> </assembly> 建立文本文件,名为 UAC.rc,内容: 1 24 UAC.manifest 编译成 uac.res 文件,运行: brcc32 uac.rc -fouac.res **2.在代码中引入** 打开项目文件,加入 {$R uac.res} **3.编译程序** 这时程序就支持 VISTA 了,在运行的时候,会弹出 WINDOWS 的提示框,询问用户是否允许以管理员身份运行。 相关文章 无相关文章 Last modification:January 27th, 2014 at 08:57 pm © 允许规范转载 Support 如果觉得我的文章对你有用,请随意赞赏 ×Close Appreciate the author Sweeping payments Pay by AliPay Pay by WeChat