[跳过Inno Setup中的准备安装向导页面

问题描述 投票:1回答:1

参考问题Basic or Advanced installation mode choice to skip or use advanced options pages,我现在需要跳过准备安装向导页面。

在我的情况下,显示此页面,因为一个或多个程序正在使用需要由安装程序替换的文件;因此安装程序会询问用户是否要安装程序自动关闭应用程序并在安装结束时重新启动。

我需要在基本模式下从设置过程中隐藏此页面,并且如果使用了某些文件,则安装程序将自动关闭使用它们的应用程序,而不会向用户提出任何要求。

我尝试将ShouldSkipPage编辑为:

function ShouldSkipPage(PageID: Integer): Boolean; 
begin 
  { If "Basic" mode is selected, skip Directory and Components pages }
  Result := 
    ModePage.Values[0] and
    ((PageID = wpSelectDir) or (PageID = wpSelectComponents) or (PageID = wpReady) or (PageID = wpPreparing));
end;

添加(PageID = wpPreparing),但页面仍以基本模式显示。

是否有使用Inno Setup实施此方法的方法?

installer inno-setup pascalscript
1个回答
0
投票

ShouldSkipPage event甚至没有为ShouldSkipPage调用。该页面不会被跳过。

如果您仍然想跳过它,则必须使用类似以下的技巧:

采用第一种方法,您的代码将如下所示:

Inno Setup - How to close finished installer after a certain time?
© www.soinside.com 2019 - 2024. All rights reserved.