如何从 NSIS 中函数中使用的标签调用部分?
我正在比较 .onInit 调用的函数中的版本检查,如果此版本检查告诉机器有旧版本,那么我想卸载旧版本。如何实现这一目标?我的方法是,如果存在旧版本,则消息框显示您已安装旧版本,单击“确定”安装新版本或取消继续使用旧版本。 IDOK 确定 IDCANCEL 取消确定:ExecWait Uninstal ;执行uninstall.exe 取消:中止;继续旧版本。
这里的问题是 ExecWait 与新版本安装并行执行。 (两个 r 都成为 2 个差异线程)
为此,我只想在函数标签内包含“卸载”部分以静默卸载。
请指导我如何从函数中调用部分。
提前致谢
I am comparing the version check in the Function called by .onInit, If this version check tells machine has older version then i would like uninstall the older version. How to achieve this?? my method is if older version is present then messagebox displays u have older version installed click ok to install new version or cancel to continue with the old version. IDOK ok IDCANCEL cancel ok: ExecWait Uninstal ; executes uninstall.exe cancel: Abort ; continue wid olde version.
problem here is ExecWait is getting executed parallely wid newer version installation. (both r becuming 2 diff threads)
for this i wanted to include only Section Uninstall inside the label of the function to uninstall silently.
Please guide me how to call Section from the Function.
Thanks in Advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不能调用一个部分,但可以这样做:
需要明确的是,ExecWait 总是等待子进程,但有时子进程启动其子进程并且不等待它们。要等待 NSIS 卸载程序,您需要使用特殊的 _?= 参数。
You cannot call a section but you can do this:
And just to be clear, ExecWait always waits for the child process but sometimes the child process starts its children and does not wait for them. To wait for a NSIS uninstaller you need to use the special _?= parameter.