質問: windowsタスクスケジューラのshutdown.exeの引数は何ですか? windowsタスクスケジューラを使用して、windows 7コンピューターを毎日特定の時間に自動的にシャットダウンしようとしています。これを行う方法に関するチュートリアルはたくさんありますが、シャットダウンスクリプトの引数のリストや説明はありません。例: ほとんどのチュートリアルでは、[引数を追加]ボックスにいくつかの引数を追加することを推奨していますが、引数の機能については説明していません。これまで、-f、-h、-t、-r、-sなどの複数の引数を見てきました。これらのそれぞれは何をしますか?もっと議論はありますか?彼らは何をしますか?引数を使用しないとどうなりますか?
回答: h:\>shutdown help usage: shutdown [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f] [/m \\computer][/t xxx][/d [p|u:]xx:yy [/c "comment"]] no args display help. this is the same as typing /?. /? display help. this is the same as not typing any options. /i display the graphical user interface (gui). this must be the first option. /l log off. this cannot be used with /m or /d options. /s shutdown the computer. /r shutdown and restart the computer. /g shutdown and restart the computer. after the system is rebooted, restart any registered applications. /a abort a system shutdown. this can only be used during the time-out period. /p turn off the local computer with no time-out or warning. can be used with /d and /f options. /h hibernate the local computer. can be used with the /f option. /e document the reason for an unexpected shutdown of a computer. /m \\computer specify the target computer. /t xxx set the time-out period before shutdown to xxx seconds. the valid range is 0-315360000 (10 years), with a default of 30. if the timeout period is greater than 0, the /f parameter is implied. /c "comment" comment on the reason for the restart or shutdown. maximum of 512 characters allowed. /f force running applications to close without forewarning users. the /f parameter is implied when a value greater than 0 is specified for the /t parameter. /d [p|u:]xx:yy provide the reason for the restart or shutdown. p indicates that the restart or shutdown is planned. u indicates that the reason is user defined. if neither p nor u is specified the restart or shutdown is unplanned. xx is the major reason number (positive integer less than 256). yy is the minor reason number (positive integer less than 65536). reasons on this computer: (e = expected u = unexpected p = planned, c = customer defined) type major minor title u 0 0 other (unplanned) e 0 0 other (unplanned) e p 0 0 other (planned) u 0 5 other failure: system unresponsive e 1 1 hardware: maintenance (unplanned) e p 1 1 hardware: maintenance (planned) e 1 2 hardware: installation (unplanned) e p 1 2 hardware: installation (planned) e 2 2 operating system: recovery (planned) e p 2 2 operating system: recovery (planned) p 2 3 operating system: upgrade (planned) e 2 4 operating system: reconfiguration (unplanned) e p 2 4 operating system: reconfiguration (planned) p 2 16 operating system: service pack (planned) 2 17 operating system: hot fix (unplanned) p 2 17 operating system: hot fix (planned) 2 18 operating system: security fix (unplanned) p 2 18 operating system: security fix (planned) e 4 1 application: maintenance (unplanned) e p 4 1 application: maintenance (planned) e p 4 2 application: installation (planned) e 4 5 application: unresponsive e 4 6 application: unstable u 5 15 system failure: stop error u 5 19 security issue e 5 19 security issue e p 5 19 security issue e 5 20 loss of network connectivity (unplanned) u 6 11 power failure: cord unplugged u 6 12 power failure: environment p 7 0 legacy api shutdown h:\> 詳細はこちら