use*_*234 4 exe nsis exit-code
在我的.nsi文件中,我正在呼叫ExecWait '"$INSTDIR\application.exe" ' $0。在application.exe中,我将返回成功和失败的退出代码。如何在.nsi文件中捕获那些退出代码。
小智 6
如果执行ExecWait时出错,则传入的用户变量的内容未定义。
要简单地检查程序是否正确执行,请检查错误标志。(顺便说一下,NSIS期望成功为零,错误为非零)
ClearErrors
ExecWait '"$INSTDIR\application.exe"'
IfErrors 0 noError
; Handle error here
noError:
Run Code Online (Sandbox Code Playgroud)
应用程序的退出代码将存储在作为第二个参数传递给 ExecWait 的变量中,因此在示例中为 $0 。
http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.1.4
| 归档时间: |
|
| 查看次数: |
7416 次 |
| 最近记录: |