英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论