开发者

Hide CMD window after using START to run a network application

开发者 https://www.devze.com 2022-12-08 17:38 出处:网络
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:

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 support开发者_如何学运维ed. 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?


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


Try: start /b /wait program.exe

0

精彩评论

暂无评论...
验证码 换一张
取 消