MS-DOS and Windows command line exit command
The exit command is used to withdraw from the currently running application and the MS-DOS session.
Exit is an internal command and is available in the following Microsoft operating systems.
- All Versions of MS-DOS
- Windows 95
- Windows 98
- Windows ME
- Windows NT
- Windows 2000
- Windows XP
- Windows Vista
- Windows 7
- Windows 8
- Windows 10
Windows Vista and later syntax
Quits the CMD.EXE program (command interpreter) or the current batch script.
EXIT [/B] [exitCode]
|/B||Specifies to exit the current batch script instead of CMD.EXE. If executed from outside a batch script, it quits CMD.EXE.|
|exitCode||Specifies a numeric number. If /B is specified, sets ERRORLEVEL that number. If quitting CMD.EXE, sets the process exit code with that number.|
Windows XP and earlier syntax
Quits the COMMAND.COM program (command interpreter).