Inno setup Inno安装程序禁用安装向导页面
是否可以禁用准备安装Inno setup Inno安装程序禁用安装向导页面,inno-setup,Inno Setup,是否可以禁用准备安装wppreading和安装wppinstalling向导页面(即带有进度条的页面),以便在安装过程中不显示这些页面?似乎没有内置指令或方法(例如,对于就绪向导页面,您可以使用DisableReadyPage=yes)。是我遗漏了什么,还是像我怀疑的那样,根本不可能 我已经尝试使用: function ShouldSkipPage(CurPageID: Integer): Boolean; begin if CurPageID = wpPreparing then
wppreading
和安装wppinstalling
向导页面(即带有进度条的页面),以便在安装过程中不显示这些页面?似乎没有内置指令或方法(例如,对于就绪向导页面,您可以使用DisableReadyPage=yes
)。是我遗漏了什么,还是像我怀疑的那样,根本不可能
我已经尝试使用:
function ShouldSkipPage(CurPageID: Integer): Boolean;
begin
if CurPageID = wpPreparing then
Result := True;
if CurPageID = wpInstalling then
Result := True;
end;
您是否在[Setup]部分尝试过此-DisableReadyPage=yes
似乎唯一的其他选择是使用“静默安装”命令行开关。尽管这实际上是在用户不知情的情况下安装了一个可能具有破坏性的程序,但我还是要小心。不可能跳过
wpproading
或wppinstalling
向导页面。但是,如果安装程序没有实际安装任何东西,而是用于返回某些东西,比如说解锁代码,就像这里的用例一样,那么可以执行以下操作:
//Disable the Exit confirmation prompt
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Cancel := True;
Confirm := False;
end;
function NextButtonClick(CurPageID: Integer): Boolean;
begin
//Get the unlock code
if CurPageID = UnlockCodePage.ID then
begin
if UnlockCodePage.Values[0] = '' then
begin
MsgBox('You must enter an installation ID to generate an unlock code.',
mbError, MB_OK);
end
else
begin
UnlockCodePage.Values[1] := GetUnlockCode;
end;
Result := False;
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
//Define button visibility, whether the Back button is enabled and change the Next and Cancel button labels
WizardForm.CancelButton.Caption := '&Close';
if CurPageID = UnlockCodePage.ID then
begin
WizardForm.BackButton.Enabled := False;
WizardForm.NextButton.Caption := '&Generate';
end;
end;
希望这可以帮助希望执行类似操作的人。是的,它只会禁用就绪向导页面。
函数ShouldSkipPage(PageID:Integer):布尔
似乎不适用于wpInstalling
或“wpPreparing”(请参见上面修改的问题)。本例中的脚本实际上不打算安装任何东西,实际上,它只是运行一些代码并显示结果,例如,根据安装ID创建一个解锁代码,以便在实际安装程序中使用。无论如何,您都不能跳过wppinstalling
页面。它是运行安装本身的重要页面。不管怎样,没有它你会怎么办?正如我所怀疑的。感谢您确认无法禁用或跳过它。如上所述,此特定脚本实际上不会安装任何内容。您可以在此页面之前中止,也可以使用代码执行检查并显示消息,而无需使用实际向导,只需使用函数InitializeSetup():Boolean代码>