Exit command in Windows
Applies to : Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012.
The exit command exits the Cmd.exe program (command interpreter) or the current batch script. To learn how to use this command, please see the example below.
The exit command is an internal command and is available in all versions of MS-DOS below Microsoft:
- Windows 95
- Windows 98
- Windows ME
- Windows NT
- Windows 2000
- Windows XP
- Windows Vista
- Windows 7
- Windows 8
- Windows 10
Syntax of exit command
exit [/b] []
Parameters
The Description / b parameter exits the current batch script instead of exiting Cmd.exe. If done from outside a batch script, it will exit Cmd.exe. exitCode Specifies a number. If the / b parameter is specified, the environment variable ERRORLEVEL is set to that number. If you are exiting Cmd.exe, then the process exit code will be set to that number. /? Show help at the command prompt.For example
To close the Cmd.exe command interpreter, enter:
exit
- When in another command interpreter, exit will exit the new command interpreter and return to the original command interpreter.
- When you import DOS from Windows, the exit command will return you to Windows.
- If in the restore panel, the exit command will exit the restore panel and restart the computer.
See more:
- Order bitsadmin getnotifycmdline, getnotifyflags, getnotifyinterface
- Bitsadmin getmodificationtime and bitsadmin getnoprogresstimeout command
- Bitsadmin getfilestransferred and bitsadmin commands getminretrydelay
3.5 ★ | 2 Vote
You should read it
May be interested
- Learn about Decibel (dB) in computer networksdecibel (db) is a standard measurement unit, used to measure the strength of wired and wireless network signals.
- Expand command in Windowsthe expand command expands one or more compressed files. you can use this command to retrieve compressed files from distribution drives.
- The reg command restores and reg saves in Windowsthe reg command restores and reg save.
- Reg unload command in Windowsthe regload command removes a portion of the loaded registry using the reg load command.
- Reg regini command in Windowsthe reg regini command helps modify the registry from the command line or script and applies the preset changes in one or more text files.
- Eventcreate command in Windowsthe eventcreate command allows the admin to create custom events in the specified event log. for an example of how to use this command, please see the example below.