Click to Rate and Give Feedback
TechNet
TechNet Library
Windows
Windows Server
Windows Server 2008
Featured Resources
Command Reference
A-Z List
 Exit
Exit

Updated: September 28, 2007

Exits the Cmd.exe program (the command interpreter) or the current batch script.

For examples of how to use this command, see Examples.

Syntax

exit [/b] [<ExitCode>]

Parameters

 

Parameter Description

/b

Exits the current batch script instead of exiting Cmd.exe. If executed from outside a batch script, exits Cmd.exe.

<ExitCode>

Specifies a numeric number. If /b is specified, the ERRORLEVEL environment variable is set to that number. If you are quitting Cmd.exe, the process exit code is set to that number.

/?

Displays help at the command prompt.

Examples

To close the command interpreter, Cmd.exe, type:

exit

Additional references

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker