找到 Inno Setup 安装目录下的 SetupLdr.e32 文件,用 Resource Hacker 将其中的 Manifest 修改一下: 改为: <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> 如图: 再重新编译生成的安装包,就都是以管理员身份运行了~ 重新编译打包脚本 使用inno setup重新编译,生成的安装包,图标会带盾牌。如下: