beat365网址官网网站-365体育世界杯专用版-365体育注册送365

Windows 10 shutdown 命令详解

Windows 10 shutdown			命令详解

首页

Windows

CMD|DOS

Windows 10 shutdown

命令详解

下一

上一

Windows 10 shutdown

命令详解

shutdown 可用于安全关闭 重启 休眠计算机,注销当前用户。

shutdown 通过调用 Windows 操作系统 X:/Windows/System32/shutdown.exe 文件执行。

一般情况下,Windows 操作系统的关机都通过调用 shutdown.exe 实现;

当然,也可终止计划中的关机操作。

另请参阅:

at

PowerCfg

基本用法

详细用法

shutdown -s -f -t 10

shutdown -s -t 300 -c "系统将在 5 分钟后自动关闭"

或根据 U 盘 J:\自动关机.txt 文件是否存在,延迟自动关闭操作系统。

if not exist J:自动关机.txt shutdown -s -t 60 -c "系统将在 1 分钟后自动关闭"

gpedit.msc --> 本地计算机 策略\计算机机配置\Windows 设置\脚本(启动/关机)\启动 --> 添加包含以上代码的 *.BAT 文件。

基本语法

shutdown [/i | /l | /s | /sg | /r | /g | /a | /p | /h | /e | /o] [/hybrid] [/soft] [/fw] [/f]

[/m \\computer][/t xxx][/d [p|u:]xx:yy [/c "comment"]]

注意:

Windows 7 没有 /sg /o 及 [/hybrid] [/soft] [/fw] 参数

参数

EN 解释

中文翻译

备注

没有参数

Display help.

This is the same as typing /?.

显示帮助。

这等同键入 /?。

/?

Display help.

This is the same as not typing any options.

显示帮助。

这等同不键入任何选项。

/a

Abort a system shutdown.

This can only be used during the time-out period.

Combine with /fw to clear any pending boots to firmware.

中止系统关闭。

这只能在超时期间使用。

结合 /fw 能清零任何挂起的固件引导。

/c "comment"

Comment on the reason for the restart or shutdown.

Maximum of 512 characters allowed.

注释重启或关机的原因。

最大允许 512 字符。

/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).

提供重启或关机的原因。

p 指示已计划重启或关机。

u 指示用户定义的原因。

若 p 和 u 均未指定,则重启或关机是计划外的。

xx 是主要原因编号 (小于 256 的正整数)

yy 是次要原因编号 (小于 65536 的正整数)

/e

Document the reason for an unexpected shutdown of a computer.

文档计算机意外关闭原因。

/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.

强制关闭正运行的应用程序,不预警用户。

当指定 /t 参数大于 0,则 /f 参数被隐含。

/fw

Combine with a shutdown option to cause the next boot to go to the firmware user interface.

与关机选项结合能使下次引导进入固件用户界面。

/g

Full shutdown and restart the computer.

After the system is rebooted, restart any registered applications.

完整关闭并重新启动计算机。

系统重引导后,重启任何已注册应用程序。

/h

Hibernate the local computer.

Can be used with the /f option.

休眠本地计算机。

可与 /f 选项一起使用。

/hybrid

Performs a shutdown of the computer and prepares it for fast startup.

Must be used with /s option.

履行计算机的关闭并为快速启动做准备。

必须与 /s 选项一起使用。

/i

Display the graphical user interface (GUI).

This must be the first option.

显示 GUI (图形用户界面)。

这必须是第一选项。

/l

Log off.

This cannot be used with /m or /d options.

注销。

这不能与 /m 或 /d 选项一起使用。

/m \\computer

Specify the target computer.

指定目标计算机。

/o

Go to the advanced boot options menu and restart the computer.

Must be used with /r option.

转到高级引导选项菜单并重启计算机。

必须与 /r 选项一起使用。

/p

Turn off the local computer with no time-out or warning.

Can be used with /d and /f options.

关闭本地计算机 (没有超时或警告)。

可与 /d 和 /f 选项一起使用。

/r

Full shutdown and restart the computer.

完整关闭并重启计算机。

/s

Shutdown the computer.

关闭计算机。

/sg

Shutdown the computer.

On the next boot, restart any registered applications.

关闭计算机。

在下次引导时,重启任何已注册应用程序。

/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.

把关机前的超时时间设为 xxx 秒。

有效范围 0-315360000 (10 年),默认 30。

如超时时间大于 0,则 /f 参数被隐含。

关机原因

E = 预期 U = 意外 P = 计划内,C = 客户定义

类型

主要

次要

EN 解释

中文翻译

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 (Unplanned)

操作系统: 恢复 (计划内)

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 (Unplanned)

安全问题 (计划外)

E

5

19

Security issue (Unplanned)

安全问题 (计划外)

E P

5

19

Security issue (Planned)

安全问题 (计划内)

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

旧版 API 关机

基本用法

功能

命令

文字解释

示例

示例解释

帮助

shutdown

展示帮助信息

shutdown /?

展示帮助信息

版权声明:

本文为独家原创稿件,版权归

乐数软件

,未经许可不得转载。

首页

Windows

CMD|DOS

Windows 10 shutdown

命令详解

下一

上一