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
精彩评论