当第 3 方软件安装被取消时,Inno Setup 跳过安装后
Inno Setup skips postinstall when 3rd party software installation was cancelled
我正在使用 Inno Setup,我需要安装第 3 方软件。但是,如果我取消第 3 方安装,安装程序将跳过安装后 运行 任务并继续完成提示计算机重新启动的安装向导。有没有办法在取消第 3 方安装后继续安装后?这是示例代码。
[Tasks]
Name: "install_3rdparty"; Description: "Install 3rd party"; GroupDescription: "Prerequisite software:"
[Files]
Source: "driverrdparty.exe"; DestDir: {app}\driver
[Run]
Filename: "{app}\driverrdparty.exe"; StatusMsg: "Installing 3rd party"; Check: IsWin64(); Tasks: install_3rdparty; Flags: skipifsilent
Filename: "{app}\my_program.exe"; Flags: postinstall; Description: "Launch my program"
Inno Setup 出于某种原因认为第 3 方安装程序进行了需要重新启动的更改。
可能是因为第 3 方安装程序为下次重启安排了文件替换。
您可以使用 RestartIfNeededByRun
directive:
禁用 Inno Setup 检测此问题
When set to yes
, and a program executed in the [Run] section queues files to be replaced on the next reboot (by calling MoveFileEx or by modifying wininit.ini), Setup will detect this and prompt the user to restart the computer at the end of installation.
我正在使用 Inno Setup,我需要安装第 3 方软件。但是,如果我取消第 3 方安装,安装程序将跳过安装后 运行 任务并继续完成提示计算机重新启动的安装向导。有没有办法在取消第 3 方安装后继续安装后?这是示例代码。
[Tasks]
Name: "install_3rdparty"; Description: "Install 3rd party"; GroupDescription: "Prerequisite software:"
[Files]
Source: "driverrdparty.exe"; DestDir: {app}\driver
[Run]
Filename: "{app}\driverrdparty.exe"; StatusMsg: "Installing 3rd party"; Check: IsWin64(); Tasks: install_3rdparty; Flags: skipifsilent
Filename: "{app}\my_program.exe"; Flags: postinstall; Description: "Launch my program"
Inno Setup 出于某种原因认为第 3 方安装程序进行了需要重新启动的更改。
可能是因为第 3 方安装程序为下次重启安排了文件替换。
您可以使用 RestartIfNeededByRun
directive:
When set to
yes
, and a program executed in the [Run] section queues files to be replaced on the next reboot (by calling MoveFileEx or by modifying wininit.ini), Setup will detect this and prompt the user to restart the computer at the end of installation.