动态禁用欢迎页面

Dynamically Disable Welcome Page

我正在尝试动态禁用欢迎页面: 这是我试过的不同选项

[SETUP]
DisableWelcomePage={code:ShouldSkipAutorun}
...
[CODE]
function ShouldSkipAutorun(Default: string):boolean;
begin
  ...
// will return true or false on whether to disable it or not
end;

错误:"Value of [Setup] section directive "DisableWelcomePage" 无效"

接下来我尝试使用 shouldskippage 但文档说

This event function isn't called for the wpWelcome, wpPreparing, and wpInstalling pages, nor for pages that Setup has already determined should be skipped (for example, wpSelectComponents in an install containing no components

有什么帮助吗?

使用inno中的ShouldSkipPage函数

在 [Setup] 部分将 DisableWelcomePage 默认值设置为 no

[Setup]
DisableWelcomePage=no

修改您的[代码]部分如下

[CODE]
function ShouldSkipAutorun():boolean;
begin
  Result:=/** add you result here (TRUE or FALSE) **/;
end;

function ShouldSkipPage(PageID: Integer): Boolean;
begin
  Result := False;    
  if PageID = wpWelcome then
  begin
    Result := ShouldSkipAutorun;
  end;
end;