如何在执行Inno Setup运行部分命令后请求重新启动?

huangapple go评论64阅读模式
英文:

How to ask for reboot after executing Inno Setup Run section command?

问题

在Inno Setup中,有NeedRestart事件函数,用于指示安装程序在成功安装结束时提示用户重新启动系统。不幸的是,此事件在执行[Run]部分的命令之前被调用(例如,在Inno Setup 6.2中进行了检查)。

我的应用程序需要使用[Run]部分的命令设置一些驱动程序,执行后我可以检查Windows是否需要重新启动。

是否有一种直接的方式在[Run]后强制重新启动提示?

英文:

In Inno Setup there is NeedRestart event function to instruct Setup to prompt the user to restart the system at the end of a successful installation. Unfortunately this event is called just before executing commands from [Run] section (checked with e.g. Inno Setup 6.2).

My application require to setup some drivers using commands from [Run] section and after their execution I can check whether Windows needs reboot or not.

Is there any straightforward way to force reboot prompt after [Run] or not?

答案1

得分: 1

ssInstall步骤中使用Exec函数运行驱动程序安装(CurStepChanged事件函数)。

这发生在NeedRestart之前。

当然,你可以直接在NeedRestart中运行驱动程序安装。但那是一个不太美观的解决方案。

英文:

Run your driver installation using Exec function from ssInstall step (CurStepChanged event function).

That happens before NeedRestart.

You can of course run the driver installation from NeedRestart itself. But that's ugly solution.

huangapple
  • 本文由 发表于 2023年4月13日 22:03:22
  • 转载请务必保留本文链接:https://go.coder-hub.com/76006376.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定