Re: WSCRIPT.EXE does not set ERRORLEVEL

Tech-Archive recommends: Speed Up your PC by fixing your registry




"Krzysztof Żelechowski" <yecril71pl@xxxxxxxxxxxxxxxx> wrote in message
news:D62C856D-4E92-4F2E-8D1E-3A20A7C0C1DD@xxxxxxxxxxxxxxxx
I have noticed that cscript.exe sets ERRORLEVEL but wscript.exe does not.
Why is that?

Wscript.exe is intended for double clicking a script. Cscript is intended
for use within batch files. Exit codes are returned to batch files, hence,
cscript is the logical host that should return an exit code.

.



Relevant Pages

  • cscript errors
    ... Im using cscript to execute some VBS files. ... There are two variants of the deployment scripts. ... batch files and the other uses NAnt. ...
    (microsoft.public.scripting.wsh)
  • Re: logon scripts?
    ... I'm not very familiar with Windows Scripting, ... > these types of commands be incorporated with batch files? ... > batch files I'm using for logon scripts with windows script files? ... I believe you could run them via a batch file by calling the cscript ...
    (microsoft.public.windows.server.networking)