windows定时关机程序_控制Windows在关机前杀死应用程序的等待时间

Windows在关机时会给予运行中的应用和服务一定时间关闭,你可以控制这个等待时间。通过注册表编辑器,可以调整WaitToKillAppTimeout、HungAppTimeout和AutoEndTasks的设置,以加快或减慢强制关机的速度。WaitToKillAppTimeout控制应用关闭的等待时间,HungAppTimeout设定应用无响应后Windows考虑强制关闭的时间,而AutoEndTasks选项则允许Windows在用户许可下自动结束任务。注意,不建议将这些值设得过低,以免影响应用正常关闭。
摘要由CSDN通过智能技术生成
windows定时关机程序

windows定时关机程序

When you shut down your computer, Windows doesn’t shut down immediately. Instead, it gives running applications and services some time to close first. You can control how long Windows waits—and whether it automatically closes running applications or not.

关闭计算机时,Windows不会立即关闭。 相反,它为运行中的应用程序和服务提供了一些时间以使其先关闭。 您可以控制Windows等待的时间,以及是否自动关闭正在运行的应用程序。

You shouldn’t normally need to change these settings, but it can be helpful if you’d like to force your computer to shut down more quickly. Some applications may also mess with these settings when you install them, and you might want to reset them to the default values if your shutdown process seems slow.

通常,您不需要更改这些设置,但是如果您想强制计算机更快地关机,则可能会有所帮助。 安装它们时,某些应用程序也可能会与这些设置混淆,如果关闭过程看起来很慢,则可能需要将它们重置为默认值。

更改桌面应用程序的等待时间 (Change the Wait Time for Desktop Applications)

There are three registry settings that control what Windows does with running applications when you shut down your computer:

关闭计算机时,有三种注册表设置可控制Windows对正在运行的应用程序执行的操作:

  • WaitToKillAppTimeout: When you shut down your PC, Windows gives open applications 20 seconds to clean up and save their data before offering to close them. This value controls how many seconds Windows waits for.

    WaitToKillAppTimeout :当您关闭PC时,Windows会在打开关闭的应用程序之前提供20秒的时间来清理并保存其数据。 该值控制Windows等待多少秒。

  • HungAppTimeout: Windows considers applications “hung” if they don’t respond within 5 seconds and gives you a “force shut down” option. This value controls how many seconds Windows waits before considering applications unresponsive.

    HungAppTimeout :如果Windows应用程序在5秒钟内未响应,则Windows 会将其视为“挂起”,并为您提供“强制关闭”选项。 此值控制Windows在考虑应用程序无响应之前等待的秒数。

  • AutoEndTasks: Windows normally displays an “force shut down” button after the number of seconds expires, asking for your permission to close any running applications. If you enable this option, Windows will instead automatically close any applications and shut down without your input.

    AutoEndTasks :在秒数到期后,Windows通常会显示一个“强制关闭”按钮,要求您关闭所有正在运行的应用程序。 如果启用此选项,则Windows会自动关闭所有应用程序并在没有您输入的情况下关闭。

Standard warning: Registry Editor is a powerful tool and misusing it can render your system unstable or even inoperable. This is a pretty simple hack and as long as you stick to the instructions, you shouldn’t have any problems. That said, if you’ve never worked with it before, consider reading about how to use the Registry Editor before you get started. And definitely back up the Registry (and your computer!) before making changes.

标准警告:注册表编辑器是一个功能强大的工具,滥用它会使您的系统不稳定甚至无法运行。 这是一个非常简单的技巧,只要您按照说明进行操作,就不会有任何问题。 也就是说,如果您以前从未使用过它,请在开始之前考虑阅读有关如何使用注册表编辑器的信息 。 并在进行更改之前一定要备份注册表 (和您的计算机 !)。

To change these settings, you’ll need to use the Registry Editor. To open it, press Windows+R on your keyboard, type “regedit”, and press Enter.

要更改这些设置,您需要使用注册表编辑器。 要打开它,请按键盘上的Windows + R,输入“ regedit”,然后按Enter。

Navigate to the following key in the left pane of the registry editor window:

导航到注册表编辑器窗口左窗格中的以下键:

HKEY_CURRENT_USER\Control Panel\Desktop

Check to see if you have any of the “WaitToKillAppTimeout”, “HungAppTimeout”, or “AutoEndTasks” settings in the right pane. If you don’t see them, Windows is using the default settings.

检查右窗格中是否具有“ WaitToKillAppTimeout”,“ HungAppTimeout”或“ AutoEndTasks”设置。 如果您没有看到它们,则Windows正在使用默认设置。

To create one of these settings, right-click the “Desktop” key in the left pane and select New > String Value. Name it “WaitToKillAppTimeout”, “HungAppTimeout”, or “AutoEndTasks”—whichever setting you want to customize. Repeat this process to add a second one or even all three.

要创建这些设置之一,请右键单击左窗格中的“桌面”键,然后选择“新建”>“字符串值”。 将其命名为“ WaitToKillAppTimeout”,“ HungAppTimeout”或“ AutoEndTasks”,无论您要自定义哪个设置。 重复此过程以添加第二个或全部三个。

To configure the WaitToKillAppTimeout value, create the string value and double-click it. Enter a value in milliseconds. For example, the default value is “20000”, which is 20000 milliseconds or 20 seconds. If you wanted to set it to 5 seconds, you’d enter “5000”.

要配置WaitToKillAppTimeout值,请创建字符串值,然后双击它。 输入以毫秒为单位的值。 例如,默认值为“ 20000”,即20000毫秒或20秒。 如果要将其设置为5秒,请输入“ 5000”。

We don’t recommend setting this value too low, as applications do need time to clean up. As a rule of thumb, don’t set it below 2000, or 2 seconds.

我们不建议将此值设置得太低,因为应用程序确实需要时间进行清理。 根据经验,请勿将其设置为2000或2秒以下。

To configure the HungAppTimeout value, create the string and double-click it. Enter a value in milliseconds. For example, the default value is “5000”, which is 5000 milliseconds or 5 seconds. If you wanted to set it to 3 seconds, you’d enter “3000”.

要配置HungAppTimeout值,请创建字符串并双击它。 输入以毫秒为单位的值。 例如,默认值为“ 5000”,即5000毫秒或5秒。 如果要将其设置为3秒,请输入“ 3000”。

We don’t recommend setting this value too low, or Windows will think applications are unresponsive when they aren’t. As a rule of thumb, don’t set it below 1000, or 1 second.

我们不建议将此值设置得太低,否则Windows会认为应用程序没有响应时无响应。 根据经验,请勿将其设置为1000或1秒以下。

To configure the AutoEndTasks value, create the string and double-click it. Set it to “1” if you want Windows to automatically close programs at shutdown. The default value is “0”, which means Windows won’t automatically close programs at shutdown.

要配置AutoEndTasks值,请创建字符串并双击它。 如果希望Windows在关机时自动关闭程序,请将其设置为“ 1”。 默认值为“ 0”,这表示Windows在关闭时不会自动关闭程序。

Be careful to save your work in any running programs before you shut down if you tell Windows to automatically close open programs. You could lose any open work when Windows abruptly forces programs to close at shutdown.

如果您告诉Windows自动关闭打开的程序,请在将其保存在任何正在运行的程序中之前小心保存。 当Windows突然强制关闭程序时,您可能会丢失任何打开的工作。

To undo a change, locate the WaitToKillAppTimeout , HungAppTimeout , or AutoEndTasks values in the right pane. Right-click the option and select “Delete” to remove it. Windows will use the default setting instead.

要撤消更改,请在右窗格中找到WaitToKillAppTimeoutHungAppTimeoutAutoEndTasks值。 右键单击该选项,然后选择“删除”将其删除。 Windows将改用默认设置。

后台服务 (Background Services)

Windows only offers one registry setting that controls what Windows does with background system services when you shut down your computer:

Windows仅提供一种注册表设置,用于控制关闭计算机时Windows对后台系统服务的作用:

  • WaitToKillServiceTimeout: Windows normally waits 5 seconds for background services to clean up and close when you tell your computer to shut down. Some applications may change this value when you install them, giving their background services extra time to clean up. Windows forcibly shuts down background services after this period of time. This value controls how many seconds Windows waits before doing so. Windows will automatically shut down if all services close successfully before the timer expires.

    WaitToKillServiceTimeout :当您告诉计算机关闭时,Windows通常会等待5秒以清理和关闭后台服务。 一些应用程序在安装时可能会更改此值,从而使它们的后台服务有更多的时间来清理。 Windows在这段时间后强行关闭后台服务。 此值控制Windows等待多少秒。 如果所有服务在计时器到期之前成功关闭,则Windows将自动关闭。

To change this setting, you’ll need to use the Registry Editor. To open it, press Windows+R on your keyboard, type “regedit”, and press Enter.

要更改此设置,您需要使用注册表编辑器。 要打开它,请按键盘上的Windows + R,输入“ regedit”,然后按Enter。

Navigate to the following key in the left pane of the registry editor window:

导航到注册表编辑器窗口左窗格中的以下键:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control

Locate the WaitToKillServiceTimeout value in the right pane. If you don’t see it, right-click the “Control” key in the left pane, select New > String Value, and name it “WaitToKillServiceTimeout”.

在右窗格中找到WaitToKillServiceTimeout值。 如果看不到,请右键单击左窗格中的“ Control”键,选择“新建”>“字符串值”,并将其命名为“ WaitToKillServiceTimeout”。

Double-click the WaitToKillServiceTimeout value and enter a number of milliseconds. The default is 5000 milliseconds, or 5 seconds. To set it to 20 seconds, you’d enter “20000”.

双击WaitToKillServiceTimeout值,然后输入毫秒数。 默认值为5000毫秒,即5秒。 要将其设置为20秒,请输入“ 20000”。

You shouldn’t set a value too low or background services won’t be able to shut down properly. As a rule of thumb, don’t set this value below “2000”, or 2 seconds.

您不应将值设置得太低,否则后台服务将无法正确关闭。 根据经验,请勿将此值设置为低于“ 2000”或2秒。

To undo this change, return here and double-click the WaitToKillServiceTimeout option. Set it to “5000”, the default setting.

要撤消此更改,请返回此处,然后双击WaitToKillServiceTimeout选项。 将其设置为“ 5000”,默认设置。

翻译自: https://www.howtogeek.com/282062/control-how-long-windows-waits-before-killing-apps-at-shutdown/

windows定时关机程序

注册表修改大全 作者:Sunny 编辑:Sunny 编辑日期:2002年12月17日 23:11分 :http://www.sunny.com/WinME : sunny@elong.com ★ 更改关闭应用程序时出现“等待”对话框的时间 有时应用程序因某种原因,会没有响应,当我们按下CTRL+ALT+DEL来结束应用程序时,系统要等一段时间才能结束任务,我们可以修改注册表来减少这段时间。 打开注册表,找到主键:“HKEY_CURRENT_USER\Control Panel\desktop”,在右侧窗口新建一“字符串值”,将其命名为“WaitToKillAppTimeOut”。双击“WaitToKillAppTimeOut,然后在“编辑字符串”对话框的“键值”框中输入5000(单位为ms,缺省值为20000ms,即20秒),为了缩短系统关闭应用的等待时间,您可以将此等待时间降低为20000ms以下,如10000ms、15000ms等。 ★ 启动时给自己个欢迎窗口 打开注册表,找到主键: “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Winlogon”,在右边窗口新建两个字符串,“LegalNoticeCaption”和“LegalNoticeText”。 “LegalNoticeCaption”是指弹出窗口的标题,修改它的值。在这里自己可以随便起个名字如“我的计算机”。 "LegalNoticeText",是指你想在登录对话框中显示的文字,如改为“祝你今天工作愉快!”这样,以后启动电脑时会自动弹出这个欢迎框。 ★ 设定口令的最小长度 通常登陆口令可以设置为空。为了安全起见,可以设定口令的最小长度,以防止口令被破解。 打开注册表编辑器,找到主键: “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Polices\ Network”键下。 在右侧窗口中新建二进制键值“MinPwdLen”,值为设定的口令的最小长度,默认值为0,表示口令可以为空。如设为“3”,则口令最小长度为3。 ★使Windows口令必须为数字和字母 设定口令为字母和数字,可以增加别人破你的口令的难度,如果口令长度足够长,则很难破解。打开注册表,找到: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Network分支,在右窗格内新建一个DWORD值为“AlphanumPwds”,修改“AlphanumPwds”键值,在出现的对话框中的“键值”框内输入1。 ★ 防止匿名用户登录 WINDOWS的本身的登陆窗口安全性很差,在不知道口令的情况下可以轻易点“取消”或按“ESC”键轻松进入。修改注册表可以防止匿名用户登陆。 打开注册表,找到主键: “HKEY_LOCAL_MACHINE\Network\Logon”,新建DWORD值,名为“MustBeValidated”,键值为“1”;再重新启动机器后,你会发现通过点击Cancel按钮进Windows的办法已经不灵了。(如果自己都进不去了,可以以安全模式进入,然后将其值改为0。) ★禁用注册表编辑器Regedit 通过修改注册表,可以控制整个机器,可以禁止修改注册表,防止别人破坏HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System,如果你发现“Policies”下面没有“System”,则在它下面新建一个主键,名字就是“"System”,然后在右侧窗口中新建一个DWORD,名字取为“DisableRegistryTools”,修改它的值为“1”,以后,别人、甚至是你都无法再用regedit.exe 啦,如果要恢复的话,用记事本建立一个REG.REG文件,保存后双击即可导入注册表 REGEDIT 4 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System] "DisableRegistryTools"=dword:00000000 。 ★禁用口令缓存 打开注册表,找到主键: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Ne
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值