Wednesday, 18 June 2014

Exit command

Exits the current batch script or the Cmd.exe program (that is, the command interpreter) and returns to the program that started Cmd.exe or to the Program Manager.

Syntax

exit [/b] [ExitCode]


 

Parameters

/b   Exits the current batch script.

ExitCode   Specifies a numeric number.

/?   Displays help at the command prompt.


 

Remarks

  • If you use /b outside of a batch script, it will exit Cmd.exe.
  • If you use /b, Cmd.exe sets the ERRORLEVEL to the specified ExitCode. If you exit Cmd.exe, Cmd.exe sets the process exit code with the specified ExitCode.


 

No comments:

Post a Comment