我有一个小设置项目来运行 vb.net 项目,安装/设置环境在 32 位和 64 位和 inno-setup 帮助我运行它的正确版本。这是代码,很短。我的问题是DisableReadyPage=yes
仍然显示准备安装页面。如何摆脱它?
即使我禁用[file]
并且[run]
准备安装页面的部分仍然存在...
[Setup]
AppName=xxx Environment
AppVerName=xxx Environment
AppPublisher=zzz
AppPublisherURL=somewebaddress1
AppSupportURL=somewebaddress2
AppUpdatesURL=somewebaddress3
AppID="xxx Environment"
DefaultDirName={pf}\zzz
PrivilegesRequired=admin
DefaultGroupName=xxx Environment
CreateUninstallRegKey=no
DisableDirPage=yes
DisableProgramGroupPage=yes
DisableWelcomePage=yes
DisableReadyPage=yes
DisableFinishedPage=yes
DirExistsWarning=yes
OutputDir=.
OutputBaseFilename="Setup"
[Files]
Source: Unzip.exe; DestDir: {tmp}; Flags: deleteafterinstall
Source: Setup.zip; DestDir: {tmp}; Flags: deleteafterinstall
[Run]
Filename: "{tmp}\UNZIP.EXE"; Parameters: "{tmp}\Setup.zip -d {tmp}"
Filename: "{code:RunInstallExe}"
[Code]
function GetProcessorTypeId (): Integer;
var
s: String;
i: Integer;
begin
case ProcessorArchitecture of
paX86: i := 1;//s := 'x86';
paX64: i := 2;//s := 'x64';
paIA64: i := 3;//s := 'Itanium';
else
i := 0;//s := 'Unrecognized';
end;
Result := i;
end;
function RunInstallExe(Param: String): String;
var
_path: string;
_procId: Integer;
begin
_procId := GetProcessorTypeId();
if _procId = 1 then
begin
_path := ExpandConstant('{tmp}\Install86Environ.exe');
end
else if _procId = 2 then
begin
_path := ExpandConstant('{tmp}\Install86Environ.exe');; //run in wow64 mode
end
else if _procId = 3 then
begin
_path := ExpandConstant('{tmp}\Install64Environ.exe');;
end
else
begin
_path := '';
end
if FileExists(_path) then
begin
Result := _path;
end
else
begin
MsgBox('Installation package not found.', mbCriticalError, MB_OK);
end
end;