Hiding the “Ready” page in an Inno Setup installer

2019-08-07 20:48发布

问题:

I have a little setup project to run vb.net project, installation/setup environment in 32 and 64 bits and inno-setup helps me to run the right version of it. Here is the code, it is short. My problem is that DisableReadyPage=yes still shows the ready to install page. How to get rid of it?

Even if I disable [file] and [run] sections ready to install page is still there...

[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;

回答1:

According to the documentation:

When Setup is not running silently, this directive is ignored if no other wizard page before the Ready to Install wizard page has been shown yet.

With all of the Disable*Page directives you have, it's the first page that's being displayed.

What is your goal in disabling all of the pages?



标签: inno-setup