java 关闭usb电源_如何在Windows中安全关闭USB设备的电源

java 关闭usb电源

java 关闭usb电源

image

Have you ever safely removed your USB device only to see that the LED activity light on your device remains on? This is caused by a change to Windows that has affected every version since Windows Vista. Here’s how to fix it.

您是否曾经安全地卸下USB设备,只是看到设备上的LED活动指示灯仍然亮着? 这是由Windows更改引起的,该更改影响了Windows Vista以来的每个版本。 解决方法如下。

Note that we’re not necessarily recommending you apply this change unless you need it.

请注意,除非需要,我们不一定建议您应用此更改。

Thanks to reader André Torga for this solution.

感谢读者AndréTorga提供此解决方案。

为什么会这样? (Why is This Happening?)

Back in the days of Windows XP, when you safely removed a USB device the device was marked as removed and the USB hub port to which the device was connected was marked as disabled, which means that the device could no longer receive USB power and therefore the LED status light would turn off. However, since Windows Vista this is no longer the case, while the USB device is marked as removed the USB hub to which it is connected remains enabled.

在Windows XP时代,当您安全地卸下USB设备时,该设备被标记为已卸下,并且该设备所连接的USB集线器端口被标记为已禁用,这意味着该设备无法再获得USB电源,因此LED状态指示灯将熄灭。 但是,由于不再是Windows Vista,因此将USB设备标记为已删除时,与其连接的USB集线器保持启用状态。

您如何解决此问题? (How Can You Fix This ?)

There is a setting in the registry that allows you to revert to the behavior of the Safely Remove dialog to that of Windows XP. To edit it, press the Windows + R keyboard combination type regedit and hit enter.

注册表中有一个设置,可让您将“安全删除”对话框的行为还原为Windows XP。 要对其进行编辑,请按Windows + R键盘组合键入regedit,然后按Enter。

image

When the Registry Editor opens, navigate to:

注册表编辑器打开后,导航至:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbhub

HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ usbhub

image

Then click on the edit menu and create a new key, called HubG.

然后单击编辑菜单并创建一个名为HubG的新密钥。

image

Then inside the new HubG key, create a new DWORD (32-bit) value and call it DisableOnSoftRemove.

然后在新的HubG密钥内,创建一个新的DWORD(32位)值,并将其命名为DisableOnSoftRemove。

image

Now right-click on the DisableOnSoftRemove value and choose to Modify it from the context menu.

现在,右键单击DisableOnSoftRemove值,然后从上下文菜单中选择“修改”。

image

Then change the Value data field to 1 and click OK.

然后将“数值数据”字段更改为1,然后单击“确定”。

image

You will still need to Safely Remove your device in order for this to work.

您仍然需要安全删除设备才能正常运行。

image

简单的方法 (The Easy Way)

If you prefer, you can download a zip file which contains registry keys to both enable and disable the feature. All you need to do is unzip the file and run either the enable or disable registry key.

如果愿意,可以下载一个包含用于启用和禁用该功能的注册表项的zip文件 。 您需要做的就是解压缩文件并运行启用或禁用注册表项。

翻译自: https://www.howtogeek.com/120914/how-to-make-your-usb-devices-power-down-on-safe-removal-in-windows/

java 关闭usb电源

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值