Re: errorlevel



Hi Herfried,

I've tried what you suggested ...

The application test shell I've written runs a couple of simple batch
files to return errorlevels.

These are started as processes, but by the time I query the ExitCode
property of the process, it throws an exception because the process has
already terminated(I assume).

The errormessage suggests that "there is no process associated with this
object".

Any ideas?

Luke




"Herfried K. Wagner [MVP]" <hirf-spam-me-here@xxxxxx> wrote in message
news:%23kVQFxh2FHA.636@xxxxxxxxxxxxxxxxxxxxxxx
> "Luke Vogel" <not@_real_address> schrieb:
> > I'm writing a small application that needs to run a number of
console
> > executables.
> >
> > No problem, I can use the 'shell' function with all its useful
> > parameters to run each console app.
> >
> > My problem is that I need to react to the ERRORLEVEL that is
returned by
> > the console executables in each case.
> >
> > The shell function returns a processID which is not useful in this
case.
>
> If you are using 'Process.Start' to start the executable you can use
the
> 'Process' object's 'ExitCode' property to determine the exit code.
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://classicvb.org/petition/>
>


.



Relevant Pages

  • Re: errorlevel
    ... > The application test shell I've written runs a couple of simple batch ... > files to return errorlevels. ... >>> parameters to run each console app. ... >>> the console executables in each case. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: cmdEX.exe - augmenting the existing CMD.EXE
    ... > It is different from replacement shells, like Take Command or WinOne, ... Replacing the very limited editing features of the existing console ... Not wanting to engineer another shell ... > console app that uses the ReadConsole kernel32 API has this ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: cmdEX.exe - augmenting the existing CMD.EXE
    ... > It is different from replacement shells, like Take Command or WinOne, ... Replacing the very limited editing features of the existing console ... Not wanting to engineer another shell ... > console app that uses the ReadConsole kernel32 API has this ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: [ Attn: Randy ] Ad-hoc Parsing?
    ... I think you're getting confused by the fact that the Bourne shell (sh, ... If your scripting language is incapable of dropping arbitrary data ... that this also is possible with bash scripts. ... That includes executables of all types. ...
    (alt.lang.asm)
  • Re: console command - why not official in linux etc.
    ... But I believe the 'windows' ... console has much benefit on linux. ... 'proper' shell, since on linux, most shell use is bash. ... bash shells do not provide tcl completions and syntax coloring. ...
    (comp.lang.tcl)