Fix: Hide “Safely Remove USB” Icon from Windows 10
If you use a Windows 10 computer, you must have noticed the “Safely remove USB” icon that shows up in your computer’s system tray – it’s an icon that depicts the business end of a USB coupled with a small green and white check mark on its bottom right side. This icon shows up in a Windows 10 computer’s system tray whenever a USB device is plugged into it. The purpose of this icon is to allow users to sever the connection between their Windows 10 computer and the USB device that they have inserted in it in order to allow for all reading/writing between the computer and the device to come to an end before the user can safely remove the device without risking any of the data on it being lost or corrupted.
However, for most Windows 10 users, this little icon in their system tray is nothing but a nuisance. That is especially the case with Windows 10 users who use other third-party programs to safely eject USB devices connected to their computers. Thankfully for such Windows 10 users, there is a way that they can hide this icon from their Windows 10 system tray.
If you want to remove the “Safely remove USB” icon from your Windows 10 computer’s system tray, here’s how you can do so:
Open the Start Menu.
Search for “notepad”.
Click on the search result titled Notepad.
When a fresh new instance of Notepad opens up, type/paste the following lines of code into it:
reg add “HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\SysTray” /v “Services” /t reg_dword /d 29 /f systray
Press Ctrl + S to save the new Notepad
Open the dropdown menu in front of Save as type: and click on All files to select it.
Set the new file’s name as anything you want, but make sure that it has a .bat extension, making it a Windows Batch file. For example, you can save the file as bat.
Move the new Windows Batch file to a safe location.
Once you have moved the file, right-click on it and click on Create shortcut.
Press Windows Logo key + R to open a Run
If you want to hide the USB icon for only your account, type shell:startup into the Run dialog and press Enter. If you want to hide the USB icon for all user accounts on your computer, type shell:common startup in the Run dialog and press Enter. Doing so will open the Startup folder for either your account or all of the accounts on your computer.
Select the shortcut for the Windows Batch file by clicking on it once and then press Ctrl + X to cut it from its current location.
Switch to the Startup folder you opened, right-click on an empty space in the Startup folder and click on Paste in the contextual menu or use CTRL + V.

Once the shortcut to the Windows Batch file has been moved to the Startup folder, restart your computer, and you will see that the “Safely remove USB” icon no longer shows up in your Windows 10 computer’s system tray when you insert a USB device into it.
First of all, I’d like to point out how ridiculous it is that THREE YEARS after MS made it unnecessary to use this, they’re still forcing this icon into users’ trays. Anyways, I spent a fair bit of time writing both a batch and powershell script to automate this process, thinking I could post it here for people who can’t figure out how to do this manually to use, only to find that changing this registry setting IS ONLY A PARTIAL FIX. It causes the icon to be hidden when booting up, and therefore will get rid of it a majority of time for most users, but if explorer.exe crashes or is restarted by the user, it comes back. Windows basically says FU to the user and decides that even though you went through the effort of changing that value, it’s going to just change it back. So the entry needs to be modified and systray.exe needs to be run EVERY TIME EXPLORER LOADS to completely fix this issue. Unfortunately, AFAICT there’s no way to do this with a script or simple registry tweak, but I did figure out how to do it.To fully solve this, a task needs to be created (in task scheduler) to run every time the RunOnce registry key is run, as that happens every time explorer.exe loads. You can’t simply put the command in there, because RunOnce entries are cleared after running, so it has to be a task triggered by that. Here are the details for setting it up manually and, if it lets me, the xml for the task to allow for more-or-less automating it’s creation:Name (can be whatever you want): Remove Safely Remove Hardware Tray Icon
Run as user, only when logged on
Trigger: On an event (Basic — Log: Microsoft-Windows-Shell-Core/Operational ; Source: Shell-Core ; Event ID: 62170 ; advanced settings all disabled except, obviously, enable the task itself)
Actions: Start a program (see below*)
Conditions: All unchecked
Settings: Probably doesn’t matter, but I set it to allow task to be run on demand, stop if runs longer than 3 minutes, force it to stop if it doesn’t end when requested, and don’t start a new instance*Actions: The first pair runs it hidden, which requires extra commands and won’t work if wsh or vbs are disabled. Recommend to try it first and, if it doesn’t work, use the second pair, which will flash a command window when it runs, though it should be very brief. Make sure to include the ENTIRE line, and modify the timeout value (timeout /t x) up or down as needed. Recommend not removing or lowering less than 5 as explorer may not be loaded fully enough and it may not work, and in fact more time may be needed on slower systems, but I’ve tested it at 5 seconds extensively and it’s worked flawlessly. Use one OR the other: Program/script: mshta
Arguments: vbscript:Execute(“CreateObject(“”WScript.Shell””).Run “”cmd /c timeout /t 5 & reg add HKCUSoftwareMicrosoftWindowsCurrentVersionAppletsSysTray /v Services /t reg_dword /d 29 /f & systray””, 0:close”)Program/script: cmd
Arguments: /c timeout /t 5 & reg add HKCUSoftwareMicrosoftWindowsCurrentVersionAppletsSysTray /v Services /t reg_dword /d 29 /f & systrayTo import the task instead of creating it from scratch, copy and paste the following into a file and save it as “Remove Safely Remove Hardware Tray Icon.xml” (or whatever you want to name the task). Then open Task Scheduler and click “Import Task…” on the right, browse to the file you just created, and open it. Once it imports, it should open a “Create Task” window, in which you will need to make one change. On the General tab, click the “Change User or Group” button (or press Alt+u), then “Advanced” (or Alt+a), then “Find Now” (Alt+n), then finally scroll down and find your Windows account username, select it, and hit enter three times to close it all out and save it. That’s it. I could easily make a batch file to do ALL of this automatically, since even with these steps I’m sure some will be overwhelmed, but files can’t be posted in comments. If the site admin would like me to do so, for them to post it on this page, please let me know.And here’s the content to paste into the xml:
2022-06-27T00:15:39.1874766
Remove Safely Remove Hardware Tray Icon
~~SID~~
InteractiveToken
false
true
PT3M
IgnoreNew
true
false
*[System[Provider[@Name=’Microsoft-Windows-Shell-Core’] and EventID=62170]]
mshta
vbscript:Execute(“CreateObject(“”WScript.Shell””).Run “”cmd /c timeout /t 5 & reg add HKCUSoftwareMicrosoftWindowsCurrentVersionAppletsSysTray /v Services /t reg_dword /d 29 /f & systray””, 0:close”)