#148176 - 2005-09-21 10:58 AM
Re: get Errorlevel
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Quote:
If shell is started ok then @error will be 0 cause kix did what it had to do (launch Shell) and no errors came up. To get the error codes of a Shell you could use the WSHPipe() UDF.
WshPipe() - Pipes the results of a shell command to an array.
That's not quite correct. If PSEXEC launches, completes and returns an error code (ERRORLEVEL) then @ERROR will be set to the error code.
If you use "RUN" or if the process you start detaches from the controlling process then @ERROR will always be zero as long as the process starts ok.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 2220 anonymous users online.
|
|
|