How to NOT wait for a process to complete in batch script?

放肆的年华 提交于 2020-01-13 08:25:31

问题


I have a batch script that calls a process and currently it waits for the process to complete before going to the next line. Is there a way (or a switch) for it NOT to wait and just spawn the process and continue? I am using Windows 2008.


回答1:


Use

START c:\wherever\whatever.exe



回答2:


Why not just start somecmd.exe or start "" "some command with spaces.exe"?

Note that if your command has spaces, you must put quotes around it, but if the first argument to start has quote around it the command is the second argument, so I have two sets of quotes there.




回答3:


This will probably suffice.

call "cmd /c start notepad.exe"


来源:https://stackoverflow.com/questions/2451861/how-to-not-wait-for-a-process-to-complete-in-batch-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!