2

All of a sudden my mouse appeared in the "Safely Remove Hardware" list after 6 years of usage. I'm wondering why did this behavior suddenly happen overnight. There was no update to the windows version from before this happen to the current date.

I have explored and went through these solutions already: For the regedit solution, the value was "160" and reducing it to "154" did nothing.

How to remove (not hide) the "Safely Remove Hardware" icon

Remove hardware from "safely remove hardware" list on Windows 7

I have also seen the bat file alternative.

The initial problem:

enter image description here

The properties of the mouse does not have a policy tab so there was no "Quick removal" option to trial with. enter image description here

Running "rundll32.exe shell32.dll,Control_RunDLL hotplug.dll" did not display the mouse device either.

enter image description here

6
  • 1
    Why do you care that it is listed?
    – Gantendo
    Sep 15 at 0:55
  • 1
    I don't want another icon in my tray and I like I had it minimalistic for years.
    – tosh
    Sep 15 at 1:12
  • Did you check superuser.com/a/241032/1482432 ?
    – Gantendo
    Sep 15 at 1:14
  • If you read the entire the post, you can see that is one of the links I included as part of solution searching.
    – tosh
    Sep 15 at 1:19
  • 1
    It's late. Try the value 128. "surprise removal ok".
    – Gantendo
    Sep 15 at 1:23
2

If you already seen this question, you know that you have to change the Capabilities key from the device in Registry.

The hexadecimal number you put in that key defines the "capabilities" of that device. Here you can see what number defines every "capability".

I had that same problem time ago, I found this article, but it didn't work for me. After I tweaked some keys, I finally got it to work. I'm sharing my solution instead, it worked for me, hope this works for you.


Hiding the device

If you want to hide a device from the "Safely Remove Hardware":

Before you do anything, make sure to make a Restore point, or make a backup of the registry keys you are about to edit. Just in case.

  1. Find your device ID from Device Manager, in "Events" tab. You only need the VID_XXXX&PID_XXXX part.

    Image1

  2. Locate that ID in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\.

    Image2

  3. Open that key and you will find another folder, enter there and change the Capabilities key to 60 hexadecimal.

    Image3

    If there are more folders, enter in every one and change the Capabilities key in the same way.

After that, if you open the "Safely Remove Hardware" list, you should notice that the device is no longer there.

Image4

The menu stays there until you reboot your PC. HOWEVER, changes made in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB are reverted after reboot. If you want to make that change permanent, you have to create a task in Task Scheduler to apply that change every time you boot your PC.


Make it permanent

  1. You still have the Registry Editor open? Export the key(s) you edited, save it somewhere.

    Image5

  2. Open the .reg file you've exported with Notepad, and delete everything except the Capabilities key. It has to be something like this (in my case):

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_0458&PID_5010\5&2fecf0fe&0&4]
"Capabilities"=dword:00000060
  1. Save it somewhere, in my case, I saved it on a folder C:\hide\hide.reg

  2. Open Task Scheduler, and create a new basic task:

    • Name it like you want.
    • Start the task when the computer starts.
    • The action is start a program.
      • Program or script: regedit

      • Arguments: /S "<location of your reg file>"

        (in my case should be /S "C:\hide\hide.reg")

        This command will merge the .reg file into the Registry.

  3. Once you've created the task, open it's properties, and change the Security options, should be like this:

    Image6

    • Run whether user is logged on or not
    • Do not store password
    • Run with highest privileges

Now, everytime you boot your PC, before you log on, this task will run, and hide your device from the "Safely Remove Hardware" list.

Reboot your PC, and that "Safely Remove Hardware" icon should be gone.

enter image description here

Don't worry, it will work for normal USB and other devices as usual!


But...

This will work as long as you don't disconnect or change your hidden device, even if your PC is turned off. If you do that, Windows will re-register that device and it will appear again in the "Safely Remove Hardware" list. You will need to do all these steps again.

2
  • No luck. When rebooting for the permanent solution, the "Safely Remove Hardware" would still be there but the device is listed as "...". That tells me that the reg file has been applied via task scheduler but the icon still remains.
    – tosh
    Sep 15 at 14:00
  • @tosh That can happen because somewhat "you logged on more fast before the task ran". it happens sometimes. If you want to avoid that, disable "Use sign-in info to auto finish after Update or Restart".
    – moxwel
    Sep 15 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.