Devices Add Enable or Disable New "USB connections" Context Menu in Windows 11


  • Staff
Safely_Remove_Hardware_banner.png

This tutorial will show you how to add a "USB connections" desktop context menu that allows you to quickly enable or disable new USB storage device connections on demand in Windows 10 and Windows 11.

When disabled, any new USB storage device (ex: USB flash drive or external USB drive) connected by any user afterwards will not connect and will not be available such as in This PC, File Explorer, and Disk Management. Any currently connected USB storage devices will continue to be available until the user eithers disconnects USB, sign out, restart computer, or shut down computer. USB storage device connections will remain disabled even after restarting the computer.

When enabled, any new USB storage device connected by any user afterwards will connect and be available. Any USB device connected while disabled will have to be unplugged (disconnected) and reconnected after enabling to be available.

You must be signed in as an administrator to add, remove, and use the "USB connections" context menu.



EXAMPLE: "USB connections" desktop context menu

In Windows 11, it is required to click/tap on Show more options first by default, then click/tap on USB connections.


Show_more_options.png
USB_connections_context_menu.png



Here's How:

1 Do step 2 (add) or step 3 (remove) below for what you would like to do.

2 Add "USB connections" context menu

A) Click/tap on the Download button below to download the REG file below, and go to step 4 below.​

Add_USB_Connections_desktop_context_menu.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\USB]
"Icon"="hotplug.dll,-100"
"MUIVerb"="USB connections"
"Position"="Bottom"
"SubCommands"=""


[HKEY_CLASSES_ROOT\DesktopBackground\Shell\USB\shell\01menu]
"HasLUAShield"=""
"MUIVerb"="Enable new USB connections"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\USB\shell\01menu\command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/c,REG ADD \"HKLM\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR\" /V Start /T REG_DWORD /D 3 /F' -Verb RunAs\""


[HKEY_CLASSES_ROOT\DesktopBackground\Shell\USB\shell\02menu]
"HasLUAShield"=""
"MUIVerb"="Disable new USB connections"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\USB\shell\02menu\command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/c,REG ADD \"HKLM\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR\" /V Start /T REG_DWORD /D 4 /F' -Verb RunAs\""

3 Remove "USB connections" context menu

This is the default setting.


A) Click/tap on the Download button below to download the REG file below, and go to step 4 below.​

Remove_USB_Connections_desktop_context_menu.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\DesktopBackground\Shell\USB]

4 Save the .reg file to your desktop.

5 Double click/tap on the downloaded .reg file to merge it.

6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

7 You can now delete the downloaded .reg file if you like.


That's it,
Shawn Brink


 

Attachments

  • Add_USB_Connections_desktop_context_menu.reg
    2.2 KB · Views: 108
  • Remove_USB_Connections_desktop_context_menu.reg
    532 bytes · Views: 86
Last edited:

Latest Support Threads

Back
Top Bottom