使用 START 运行网络应用程序后隐藏 CMD 窗口
我有一个通过网络运行的应用程序。我需要能够从批处理文件运行这个应用程序,并最终使用了这个:
pushd \\server\folder
start /wait program.exe
除了消息说...
\\server\folder CMD.EXE 以上述路径作为当前目录启动。 不支持 UNC 路径。默认为 Windows 目录。
...它工作正常,但 CMD 窗口仍然存在。我知道 /wait 是原因,但似乎只有使用 /wait 才能使程序成功运行。如果我删除 /wait,那么我会从程序中收到关于无法成功启动的奇怪错误。
还有什么我可以尝试的?
I have an application that is run over a network. I need to be able to run this application from a batch file, and had ended up using this:
pushd \\server\folder
start /wait program.exe
Aside from the message saying...
\\server\folder CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.
...it works fine, but the CMD window lingers. I know that /wait is the cause, but it appears that I can only get the program to run successfully if I use /wait. If I remove /wait, then I get bizarre errors from the program about not being able to start successfully.
What else might there be that I can try?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想在程序运行时隐藏程序,您还可以使用
/MIN
参数,使其最小化。If you want to hide the program while it runs, you can also use the
/MIN
param, to have it start minimized.尝试:
启动 /b /等待程序.exe
Try:
start /b /wait program.exe