![inno-setup – 使用Process Exit代码在[Run]中显示特定文件的错误消息,第1张 inno-setup – 使用Process Exit代码在[Run]中显示特定文件的错误消息,第1张](/aiimages/inno-setup+%E2%80%93+%E4%BD%BF%E7%94%A8Process+Exit%E4%BB%A3%E7%A0%81%E5%9C%A8%5BRun%5D%E4%B8%AD%E6%98%BE%E7%A4%BA%E7%89%B9%E5%AE%9A%E6%96%87%E4%BB%B6%E7%9A%84%E9%94%99%E8%AF%AF%E6%B6%88%E6%81%AF.png)
我有以下内容:
filename: "{pf32}\Common files\Authorization.exe"; Parameters: " "{code:GetAuthorizationfilePath}" /s"; WorkingDir: "{tmp}"; Flags: skipifdoesntexist hIDewizard; StatusMsg: "Authorizing license"; 归还给我:
Process exit code:0
0当然是成功的,但如果它不是0我想通知用户.
有没有办法做到这一点?
感谢致敬,
Kev84
>使用Pascal脚本执行此任务
>或显示来自您执行的应用程序Authorization.exe的模态错误消息,并仅在用户确认错误消息后终止它(然后设置将继续,例如执行[Run]部分中的其他文件)
这是Pascal脚本的代码示例;你也可以查看这段代码的commented version:
[Code]function NextbuttonClick(CurPageID: Integer): Boolean;var ResultCode: Integer;begin Result := True; if CurPageID = wpWelcome then begin Result := False; if Exec(ExpandConstant('{pf32}\Common files\Authorization.exe'),'',SW_SHOW,ewWaitUntilTerminated,ResultCode) then begin if ResultCode = 0 then Result := True else MsgBox('The authorization Failed!',mbCriticalError,MB_OK); end; end;end; 总结 以上是内存溢出为你收集整理的inno-setup – 使用Process Exit代码在[Run]中显示特定文件的错误消息全部内容,希望文章能够帮你解决inno-setup – 使用Process Exit代码在[Run]中显示特定文件的错误消息所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)