Inno Setup无法以管理员身份运行

时间:2014-06-10 23:46:32

标签: visual-c++ inno-setup privilege-elevation

我通过Inno setup创建了一个安装程序。安装程序安装的MyPro.exe应在Win7中以管理员身份运行。以下是该脚本的重要部分。但是,MyPro.exe仍然无法以管理员身份运行,也无法在\ System中编写其配置文件。你能告诉我哪个错了吗?

[Setup]
PrivilegesRequired=admin

[Icons]
Name: {group}\MyPro; Filename: {app}\MyPro.exe; Flags:

[Registry]
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{app}\MyPro.exe"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue; MinVersion: 0,6.1

Root: "HKCU"; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: String; ValueName: "{app}\MyPro.exe"; ValueData: "RUNASADMIN"; Flags: uninsdeletevalue; MinVersion: 0,6.1

0 个答案:

没有答案