去除关机选项
gpedit.msc
User Configuration(用户配置)
Administrative Templates(管理模板)
Start Menu and Taskbar(“开始”菜单和任务栏)
Remove and prevent access to the Shut Down, Restart, Sleep, and Hibernate commands
Not Configured --> Enable
这样操作之后,“关机”、“重启”等命令全没有了,我们想要的结果是保留“重启”
命令重启
shutdown -r -t 5
-r: restart
-t: time, seconds
shutdown -s -t 0
-s: shutdown
REMOVE SHUTDOWN OPTIONS FROM WINDOWS 7 START MENU