exitexit
適用対象: Windows Server (半期チャネル)、Windows Server 2019、Windows Server 2016、Windows Server 2012 R2、Windows Server 2012Applies to: Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012
コマンドインタープリターまたは現在のバッチスクリプトを終了します。Exits the command interpreter or the current batch script.
構文Syntax
exit [/b] [<exitcode>]
パラメーターParameters
パラメーターParameter | 説明Description |
---|---|
/b/b | Cmd.exe を終了するのではなく、現在のバッチスクリプトを終了します。Exits the current batch script instead of exiting Cmd.exe. バッチスクリプトの外部から実行された場合は、Cmd.exe 終了します。If executed from outside a batch script, exits Cmd.exe. |
<exitcode> |
数値を指定します。Specifies a numeric number. /Bが指定されている場合、ERRORLEVEL 環境変数はその数値に設定されます。If /b is specified, the ERRORLEVEL environment variable is set to that number. コマンドインタープリターを終了すると、プロセス終了コードはその番号に設定されます。If you are quitting the command interpreter, the process exit code is set to that number. |
/?/? | コマンド プロンプトにヘルプを表示します。Displays help at the command prompt. |
例Examples
コマンドインタープリターを閉じるには、次のように入力します。To close the command interpreter, type:
exit