About cmd's 'start "" /wait' command Just wanted to share this...
#21
Posted 11 March 2010 - 01:37 AM
I think you mean no start.
#22
Posted 11 March 2010 - 10:49 AM
Exactly, mate!
This post has been edited by Martin H: 11 March 2010 - 10:58 AM
#23
Posted 12 March 2010 - 08:19 AM
Think this is a situation where some apps will continue and some will not, I've tried removing the /wait and turns into a nightmatre doing 20-30 apps. even on Seven 64 bit
#24
Posted 12 March 2010 - 08:30 AM
Quote
Perhaps this is the reason the original recommendation was "start /wait" (cover all the bases, regardless).
Ennyhoo, a good learning experience with relevant information as to "how/why".
Aaannnd... Edit!!!
I re-read above; only says "removed wait"(See Next Post/Prev Posts)...
This post has been edited by submix8c: 12 March 2010 - 05:35 PM
#25
Posted 12 March 2010 - 04:18 PM
maxXPsoft, on 12 March 2010 - 08:19 AM, said:
Think this is a situation where some apps will continue and some will not, I've tried removing the /wait and turns into a nightmatre doing 20-30 apps. even on Seven 64 bit
You havent read what I have stated throughout the whole thread then...
"start /wait" makes ZERO difference in BAT/CMD files...
YES, some apps dosent wait, but thats besides the point, as "start /wait" dosent fix it...
Lastly, you should not remove "/wait", but "start /wait"...
@submix8c
"start /wait" dosent cover the bases and are always 100% redundant in cmd/bat files...
This post has been edited by Martin H: 12 March 2010 - 04:29 PM
#26
Posted 12 March 2010 - 11:34 PM
maxXPsoft, on 12 March 2010 - 08:19 AM, said:
Think this is a situation where some apps will continue and some will not, I've tried removing the /wait and turns into a nightmatre doing 20-30 apps. even on Seven 64 bit
Agree - I use "setup.cmd" in some of my Silent-WinRAR-SFX (I usually install with this method).
Some Setups won`t install (or stuck) without that "start /wait" because of false or "too fast" execution.
I´m sure it makes a difference in a .cmd.
#27
Posted 13 March 2010 - 08:39 AM
Btw, please give me an example of ANYTHING where "start /wait" makes a difference in cmd, and i will test it out...
Also, so you guys are not believing msft when they say in their technet article>
Quote
Console apps never waits obviously, but gui apps are gui apps no matter if they are silently executed or not...
Quote
First, the START command never waits for the command to complete.
And hence, the /wait switch when using it... Said in another way, the /wait switch modifies the start commands normal behaviour, but NOT the command shells behaviour in any way...
If that was the case, then there would instead be a switch for cmd.exe itself to change that behaviour obviously...
Anyway, im done with this now if not getting an example, as i have proven it previously in this thread both with tests and technet quotes, so unless im givin an example to prove wrong, i dont want to continue repeaing myself here...
This post has been edited by Martin H: 13 March 2010 - 08:41 AM
#28
Posted 13 March 2010 - 11:03 AM
Perhaps I have been reading this wrong, but this Cmd script from what I read should
not wait for notepad to close before the message appears. That is not the case it
waits until notepad closes before the message appears.
@Echo Off CLS Mode 55,9 Echo. Start /wait notepad CLS Echo. Echo This does not show until Notepad is closed pause
#29
Posted 13 March 2010 - 11:07 AM
gunsmokingman, on 13 March 2010 - 11:03 AM, said:
Perhaps I have been reading this wrong, but this Cmd script from what I read should
not wait for notepad to close before the message appears. That is not the case it
waits until notepad closes before the message appears.
What happens if you run this?:
@Echo Off CLS Mode 55,9 Echo. notepad.exe CLS Echo. Echo This does not show until Notepad is closed pause
Anything different happening form the one you posted?
jaclaz
#30
Posted 13 March 2010 - 04:37 PM
Finnaly someone who understands what i've been saying for two pages now... (sorry, Yzöwl as ussual also does...)
Please everyone, READ before posting!!!
Edit: I didn't even have to, but anyway i've just tested this and obviously you know what the result was...
This post has been edited by Martin H: 13 March 2010 - 04:41 PM
#31
Posted 26 May 2010 - 05:15 PM
at the command prompt:
> start "" /wait "c:/Program Files/Mozilla Firefox/firefox.exe"
=> DOESN'T WAIT
in a .cmd file:
start "" "c:/Program Files/Mozilla Firefox/firefox.exe"
or
start "" /wait "c:/Program Files/Mozilla Firefox/firefox.exe"
=> DOESN'T WAIT
i think it's a function of how the application is programmed to exit.
#32
Posted 26 May 2010 - 07:25 PM
Quote
:CHECK
ping -n 10 localhost 1> NUL
TASKLIST /v /fi "IMAGENAME eq firefox.exe" 2>&1 > NUL
IF ERRORLEVEL 1 GOTO CHECK
This post has been edited by Outbreaker: 26 May 2010 - 07:28 PM
#33
Posted 27 May 2010 - 11:46 AM
- ← Auto Run a file after the Windows XP settings are loaded
- Unattended Windows 2000/XP/2003
- Help: Script to rename a computer and edit the registry. →



Help

Back to top









