How to remove my mouse from the "Safely Remove Hardware"
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:
The properties of the mouse does not have a policy tab so there was no "Quick removal" option to trial with.
Running "rundll32.exe shell32.dll,Control_RunDLL hotplug.dll" did not display the mouse device either.
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.
-
Find your device ID from Device Manager, in "Events" tab. You only need the
VID_XXXX&PID_XXXX
part. -
Locate that ID in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\
. -
Open that key and you will find another folder, enter there and change the
Capabilities
key to 60 hexadecimal.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.
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
-
You still have the Registry Editor open? Export the key(s) you edited, save it somewhere.
-
Open the
.reg
file you've exported with Notepad, and delete everything except theCapabilities
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
-
Save it somewhere, in my case, I saved it on a folder
C:\hide\hide.reg
-
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.
-
-
Once you've created the task, open it's properties, and change the Security options, should be like this:
- 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.
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.