2017-07-30 81 views
0

我試圖禁用動態歡迎頁面: 這裏有不同的選擇,我試圖動態禁用歡迎頁面

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

錯誤: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

任何幫助嗎?

+0

的可能的複製[Inno Setup的條件跳過結束頁](https://stackoverflow.com/questions/40084003/inno-setup-有條件地跳了精加工頁) –

回答

2

使用ShouldSkipPage功能in inno。

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