在Inno Setup中执行命令后如何保持控制台窗口 [英] How can I keep console window after executing a command in Inno Setup
本文介绍了在Inno Setup中执行命令后如何保持控制台窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个脚本,例如:
Filename: "{cmd}"; Parameters: "/C "" sqlcmd -S {code:ServerName} -U {code:UserLOG} """ ; \
Flags: nowait skipifsilent
如何保持控制台窗口直到用户看到它?
How can I keep the console window until user sees it?
我需要向用户显示该控制台窗口上的操作结果。
I need to show the user the result of the operation on that console window.
推荐答案
使用暂停
Windows命令,例如:
Use pause
Windows command, like:
Filename: "{cmd}"; Parameters: "/C ""sqlcmd ... & pause"""; Flags: nowait skipifsilent
请注意,您实际上并不需要通过 cmd.exe
( {cmd}
sqlcmd >)。您可以直接运行它。但是要将 sqlcmd
与暂停
结合使用,您需要 cmd.exe
。
Note that you actually do not need to run sqlcmd
via cmd.exe
({cmd}
). You can run it directly. But to combine the sqlcmd
with the pause
, you need the cmd.exe
.
如果命令本身需要空格(例如是否需要使用 {app} \MyProg.exe
),请使用以下语法:
If the command itself needs spaces (like if you need to use {app}\MyProg.exe
), use this syntax:
Filename: "{cmd}"; Parameters: "/C """"{app}\MyProg.exe"" ... & pause"""; ...
这篇关于在Inno Setup中执行命令后如何保持控制台窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文