验证 Install4j 的 "suppressUnattendedReboot" 选项

Verify "suppressUnattendedReboot" option of Install4j

我正在使用 "Updater without version check" 的 install4j 实现静默升级。完成静默升级后,我不想在任何情况下重启机器。 所以我通过“"Set installer arguments" 动作传递参数“-Dinstall4j.suppressUnattendedReboot=true”。现在我想测试是否有效?有什么方法可以验证此参数是否已传递给安装程序?并强制执行在更新和检查此参数之间重新启动是否实际上抑制了重新启动?

Is there any way to verify this parameter is passed to installer?

在 "Run script" 操作中,您可以检查

Boolean.getBoolean("install4j.suppressUnattendedReboot")

and check this parameter actually suppressed reboot?

为了测试,您可以通过添加 "Reboot computer" 操作强制安装程序重新启动。 -Dinstall4j.suppressUnattendedReboot=true 参数将阻止重新启动。