在启动其中一个功能(任务-printer
)之前如何显示自定义向导:
[Run]
Filename: "{tmp}\First.exe"; WorkingDir: {app}; StatusMsg: First program install; Tasks: fp1;
Filename: "{tmp}\Second.exe"; WorkingDir: {app}; StatusMsg: Second program install; Tasks: fp2;
Filename: "{tmp}\Drivers\Install.exe"; WorkingDir: {app}; StatusMsg: Drivers install; Tasks: printer;
代码部分:
[Code]
procedure InitializeWizard;
var
BitmapFileName: string;
BitmapImage: TBitmapImage;
WelcomePage: TWizardPage;
begin
WelcomePage := CreateCustomPage(wpInstalling, '', '');
BitmapFileName := ExpandConstant('{tmp}\image.bmp');
ExtractTemporaryFile(ExtractFileName(BitmapFileName));
BitmapImage := TBitmapImage.Create(WelcomePage);
BitmapImage.AutoSize := True;
BitmapImage.Bitmap.LoadFromFile(BitmapFileName);
BitmapImage.Cursor := crHand;
BitmapImage.Left := 10;
BitmapImage.Top := 10;
BitmapImage.Parent := WelcomePage.Surface;
end;
我尝试用作PageId wpInstalling
,wpInfoAfter
和wpFinished
,但在驱动程序安装完成后将全部显示。而且我需要在安装第二个程序之后但在开始安装驱动程序之前出现此窗口。
答案 0 :(得分:0)
安装前的最后一页是“选择其他任务” ,因此请对CreateCustomPage
的<script type="text/javascript">
function redirect() {
const name = document.getElementById("field").value;
}
</script>
<form action="stats.html">
<input id="field" type="text" name="name" placeholder="Player Name...">
<input id="button" type="submit" value="SEARCH" onclick="redirect()">
</form>
参数使用wpSelectTasks
:
AfterID
(“选择其他任务” 是否实际显示都没有关系)