How to Remove a Specific Device from the Windows Safely Remove Hardware List

The “Safely Remove Hardware and Eject Media” menu in the system tray may list devices that users do not intend to disconnect. This list can include USB network adapters, monitors connected via Type-C, SATA or SSD drives shown as removable media, USB sound cards, and mouse devices. An administrator has the ability to remove any device from the Safely Remove Hardware interface.

  1. Launch the Device Manager by typing devmgmt.msc in the Run dialog.
  2. Select the device you wish to hide, for instance, the TP-Link Wireless USB Adapter, and open its properties.
  3. Navigate to the Details tab, locate the Hardware IDs property, and copy the device ID. For example, it could be USBVID_2357&PID_010C.
  4. Access the registry editor and go to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetEnumUSB.
  5. Find and expand the registry entry corresponding to your USB device.
  6. Set the value of the Capabilities entry to 60 (in Hex).
  7. Should your device’s registry key contain several nested subkeys, ensure you modify the Capabilities parameter value within each of those subkeys.
  8. This process will hide the USB network adapter from the Safely Remove list in the system tray.

However, upon restarting the device, the Capabilities registry value will revert to its initial setting. To lock this change automatically, establish a scheduled task that updates this registry value at system startup.

Create a new task using the Task Scheduler application (taskschd.msc) or employ the following command (be sure to adjust the path to your specific registry key):

schtasks /create /tn "Remove_TPLinkUSBAdapter_Safe_Removal" /sc ONSTART /ru SYSTEM /rl HIGHEST /tr "reg.exe add 'HKLMSYSTEMCurrentControlSetEnumUSBVID_2357&PID_010C0E04C0001' /v Capabilities /t reg_dword /d 0x00000060 /f"

The specified USB device will now be automatically excluded from the Safely Remove Hardware list.

If you wish to safely detach and remove this USB device, execute the following command:

RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll

This dialog provides a safe way to shut down the device if needed.

Additionally, you can fully remove the Safely Remove icon from the system tray.


Posted

in

,

by

Tags: