Re: commands not waiting, /wait not helping
- From: "Gary Chanson" <gchanson@xxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 24 Apr 2005 15:37:50 -0400
"bh" <bh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DC1CB73A-7149-4AC9-8379-BD0E75E4BE7A@xxxxxxxxxxxxxxxx
> "Gary Chanson" wrote:
> > Nope. Windows *NEVER* waited for GUI apps run from batch files ...
>
> Well perhaps I over-interpreted this line from the Start command help page:
> When executing an application that is a 32-bit GUI application, CMD.EXE
> does not wait for the application to terminate before returning to
> the command prompt. This new behavior does NOT occur if executing
> within a command script.
> </endquote>
> Notice the reference to "new behavior". Perhaps this is a reference to a
> change from 16-bit. Sorry for the distraction.
> At any rate there *is* a weirdness in the Start command, and the "Invalid
> switch" msg does indeed get issued from it. It turns out it's related to
> having a exe pathname with embedded spaces that needed to be in quotes.
> Originally it was: "C:\Program Files\Wise Installation System\Wise9.exe".
> Apparently because of the quotes, Start interprets it as a document name
> (which still gets executed) but this changes how following parameters are
> passed along.
> Even this simplified path will never get the /c to wise9.exe:
> start /wait "Wise9.exe" /c "U:\path\Scriptfile.wse"
> start sees it as ITS parameter. Putting it inside quotes fails for other
> reasons as well, and wise needs to see switches before the scriptname.
> Take out the quotes and it works:
> start /wait Wise9.exe /c "U:\path\Scriptfile.wse"
> So I can get past this by adding Wise to the path envvar and not quoting
it.
> However, it still does not wait. Apparently wise9 spawns a different process
> when compiling from the commandline, so wise9 itself returns immediately
> anyway.
> This is a different problem now, so I'll delve into the wise docs and/or do
> the old "watch for a file" loop.
You should be able to execute something like:
START /wait "C:\Program Files\Wise Installation System\Wise9.exe" /c
"U:\path\Scriptfile.wse"
--
-GJC [MS Windows SDK MVP]
-Software Consultant (Embedded systems and Real Time Controls)
- http://www.mvps.org/ArcaneIncantations/consulting.htm
-gchanson@xxxxxxxx
.
- Follow-Ups:
- References:
- commands not waiting, /wait not helping
- From: bh
- Re: commands not waiting, /wait not helping
- From: Gary Chanson
- Re: commands not waiting, /wait not helping
- From: bh
- commands not waiting, /wait not helping
- Prev by Date: Re: commands not waiting, /wait not helping
- Next by Date: Re: commands not waiting, /wait not helping
- Previous by thread: Re: commands not waiting, /wait not helping
- Next by thread: Re: commands not waiting, /wait not helping
- Index(es):
Relevant Pages
|