コマンドラインでシャットダウン
〜shutdown.exe〜
0.改定履歴
- 1998.07.22 初版
- 1998.08.06 NT3.51情報追加
1.はじめに
このドキュメントは,WindowsNTでコマンドラインからシャットダウンおよびリブートを行うツールである,shutdown.exeの紹介を行う.
shutdown.exeは,NT4.0リソースキットに付属している.
NT3.51用は,リソースキットのアップデート2に入っているが,これはNT4.0版と同一の物である.
2.パラメータ一覧
shutdown.exeを実行すると,次のようなコマンドオプション一覧が表示される.
Microsoft(R) Windows NT(R) (C) Copyright 1985-1996 Microsoft Corp. d:\toNT>shutdown Release 2.0 written by A. Blatzheim 1993 at Microsoft GmbH Usage: SHUTDOWN [/?] [\\Computer] [/L] [/A] [/R] [/T:xx] ["Msg"] [/Y] [/C] /? Shows this screen. \\Computer Specifies a remote computer to shutdown. /L Specifies a local shutdown. /A Abortes a systemshutdown. This is only possible during the timeout period.If this switch is used, all other are ignored. /R Specifies that the machine should reboot after shutdown. /T:xx Sets the timer for system shutdown in seconds.[20 sec. default] "Msg" Specifies an additional message /Y Answer all following questinons with yes /C Forces running applications to close. ATTENTION: If you use the /C parameter NT ignores the applications option to save data which may have canged. You will see no File-Save dialog box, because NT will force the application to close. This will result in a loss of all data. not previously saved !!! d:\toNT> |
3.オプション説明
オプション | 説明 |
---|---|
/? | ヘルプを表示する. |
\\Computer | リモートコンピュータをシャットダウンする時に,コンピュータ名で指定する. 当然名前解決に注意する. |
/L | ローカルマシン(このコマンドを実行したマシン)をシャットダウンする. |
/A | シャットダウン処理を中止する.これが有効なのは,シャットダウン処理がタイムアウトしているときである. このオプションを付けると,他のオプションは無視される. |
/R | マシンのシャットダウン後に,リブートする. |
/T:xx | 何秒後にシャットダウンするかを指定する.(単位は秒) |
"Msg" | メッセージを追加する. |
/Y | すべての質問に対して,Yesを選択する. |
/C | アプリケーションを閉じる. このオプションを使うならば,全てのアプリケーションは強制的に終了されるので,ファイルの保存ダイアログは見表示されない.よって,保存していないデータがある場合には失われる. |