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
- The exit () function in Cthe void exit (int status) function immediately terminates the calling process. any file opened by the process is closed and any child process is inherited by the initial process and the parent process is sent a sigchild signal.
- How to use the option equivalent to the 'ls' command in Windowsthe 'ls' command (note ls, not is) is one of the first terminal commands veterans teach to linux beginners.
- The command reg add in Windowsthe reg add command adds new subkeys or entries to the registry.
- Rem command in Windowsthe rem command helps write comments (comments) in a batch file or config.sys.
- Instructions for using Command Promptdeep in windows is a command-line world that is obscure. in this article, we will show you how to solve errors and make your computer more secure.
- Rd command in Windowsthe rd command helps delete a directory
- Cmd command in Windowsthe cmd command starts a new version of the command interpreter, cmd.exe. if used without parameters, cmd will display copyright information and the version of the operating system.
- How to use the command history function in Command Promptcommand prompt is an extremely familiar command for anyone using windows operating system. besides, a lot of current software also supports the command line to perform actions on the command prompt window, instead of on the screen.
- MS Access 2003 - Lesson 4: Exit Accessyou can get rid of access with many of the same methods you use to exit other windows programs.
- The sfc command in Windows(applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012)