Re: commands not waiting, /wait not helping




"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

.



Relevant Pages

  • Re: eval and wildcard expansion problem
    ... >> that command and store the results in another variable. ... >> quotes around the whole command should have protected the wildcard from ... >> expansion by the shell, but it didn't, so when it came to executing the ... i tried to protect it more by ...
    (comp.unix.shell)
  • Re: Problems installing XP SP2!
    ... package source directory and make sure the that XPSPS2sms.exe file exists in ... in your SMS Program command line property. ... > Executing program as a script ... > OnOptionalExecutionRequests failed for program Automated upgrade from XP ...
    (microsoft.public.sms.admin)
  • Re: Windows update error 0x80242008
    ... 2.219: Hotfix started with following command line: /si ... Unexpected Error While Executing Line 1 ( ... Test.IE7InstallBlock.Section) of PreRequisite ...
    (microsoft.public.windowsupdate)
  • Re: [SLE] bash Script Using Filenames with Embedded Spaces
    ... If it is a literal space for the ls command, ... wonder what effect the quotes will have placed in different places ... Antonio Vivaldi-Gloria Dixit Dominus Magnificat Choir of Kings College ...
    (SuSE)
  • RE: Open Form Code
    ... I've generally found that if you issue a DoEvents command after opening the ... I set that form's VISIBLE property to FALSE. ... VISIBLE property to TRUE immediately prior to executing the code. ...
    (microsoft.public.access.formscoding)