使用 START 运行网络应用程序后隐藏 CMD 窗口

发布于 2024-08-07 18:22:21 字数 372 浏览 9 评论 0原文

我有一个通过网络运行的应用程序。我需要能够从批处理文件运行这个应用程序,并最终使用了这个:

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

绮烟 2024-08-14 18:22:21

如果您想在程序运行时隐藏程序,您还可以使用 /MIN 参数,使其最小化。

If you want to hide the program while it runs, you can also use the /MIN param, to have it start minimized.

魂归处 2024-08-14 18:22:21

尝试:
启动 /b /等待程序.exe

Try:
start /b /wait program.exe

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文