Storage-only blocking

Block USB Storage but Keep Keyboard and Mouse Working

A BIOS port switch turns ports off. A storage rule turns drives off. Only the second lets your keyboard and mouse carry on. This guide explains the device classes involved, three ways to block storage only, and a short test that proves you did not lock yourself out.

Editorial TeamNovember 20266 min readLast verified: November 2026

Quick answer

Block the storage class, not the port. Use the Group Policy deny rule for removable storage, set the USBSTOR Start value to 4 on Windows Home, or use blocking software. Keyboards and mice are input devices on a different driver, so they keep working. Test with a drive before you walk away.

At a glance
GoalStop drives and discs, keep keyboard and mouse
MethodsGroup Policy, registry value, blocking software
Time needed5 to 15 minutes plus a test
DifficultyEasy to moderate
Last verifiedNovember 2026
Storage blocked, keyboard and mouse allowedWindowsdevice policyKeyboard allowedMouse allowedFlash drive blocked

Why a Port Switch Cannot Tell a Drive from a Keyboard

A port switch works on hardware: it turns the connector or its controller off, so everything plugged in goes dark. A device class rule works on identity. Windows asks what the device says it is, then applies a policy to that class. That is the difference that keeps input alive.

This is the root of most lockouts described in our recovery guide for dead USB input. When the goal is storage only, using the port switch is the wrong tool, because it cannot separate a keyboard from a flash drive.

The Device Class Map: What to Allow and What to Stop

The Device Class Map sorts USB gadgets into three groups: input devices to keep, storage devices to block and data-carrying gadgets to decide on. Keyboards and mice sit in the first group. Flash drives and external disks sit in the second. Phones, readers and printers need a decision.

USB device classesKeyboard, mouseHIDKeep allowedFlash drive, external diskMass storageBlock or allow-listPhone in file modeMTP / portable deviceBlock if data leavesPrinter, scannerPrinter classCase by case
Device classes: keep input, block storage, decide the rest.
Device class decisions
DeviceClassDefault choiceWhy
Keyboard, mouseInput (HID)AllowNeeded to use the PC
Flash drive, external diskMass storageBlock or allow-listMain route for copying data
Phone in file modePortable deviceDecideCan carry files like a drive
Card readerMass storageBlockBehaves like a drive
PrinterPrintingAllowNo storage role
Rule of thumbKeep what you type with, stop what you copy toReview the middle group yourself

Three Ways to Block Storage Only

Three routes block storage while leaving input alone: the Group Policy rule All Removable Storage classes: Deny all access, the USBSTOR registry value set to 4, and blocking software. Choose by Windows edition and whether you need an approved-device list.

  1. Group Policy (Pro, Enterprise, Education)

    Open the Local Group Policy Editor, go to Computer Configuration, Administrative Templates, System, Removable Storage Access, and enable the deny-all rule. Restart so it applies.

  2. Registry value (any edition)

    Set the USBSTOR service Start value to 4 in the registry, restart, and test. The exact key and a copy-ready snippet are in the Windows methods section of the main guide.

  3. Blocking software

    Install a tool as an administrator, switch on the storage categories and add approved devices. USB Block's official page lists the categories it covers.

Be aware

Do not apply registry edits you have not exported first. Back up the key, and test on a spare PC if you can.

The Lockout Test: Prove Input Still Works

Run a lockout test before you leave: restart the PC, confirm the keyboard and mouse work at sign-in, plug in a known flash drive and check that no drive letter appears, then confirm an approved device still works if you allowed one. If any step fails, undo the last change.

Lockout test

0 of 5 completed

Edge Cases: Phones, Card Readers and Hubs

Edge cases decide whether a storage rule really holds. Phones set to file transfer can carry data like a drive, card readers present as storage, and hubs only pass devices through. Test each one you own, because behavior varies with the driver and the mode the device is set to.

For a short primer on how flash drives become a leak route, one independent write-up is this guide to USB flash drive security risks. For spotting infected drives, see the USB malware and data leak guide.

Why this matters

A storage rule does not stop devices that pose as keyboards. If that threat matters to you, add an allow-list by vendor and product ID.

Storage-Only Blocking Questions

These answers cover the details people check before relying on a storage-only rule: keyboard safety, phones, charging and Windows versions. Each begins with the direct reply and then states what to test so the result is something you have verified yourself.

Can I block USB storage and still use a USB keyboard?

Yes. Storage and input use different Windows drivers, so a storage deny rule or the USBSTOR value stops drives without touching keyboards or mice. Test by restarting and signing in with the keyboard before you rely on the change. If input ever fails, undo the last edit and check Device Manager for errors.

Does the USBSTOR registry value block phones too?

Not always. USBSTOR covers mass-storage devices, while phones in file-transfer mode often use a portable-device driver. Test your phone in each mode, and add a Group Policy or software rule for portable devices if it still connects. Test one device at a time so you know which driver is responsible.

Will blocking USB storage stop phone charging?

No. These rules block data access to storage, not power. A phone can still draw charge from the port. If you must stop charging as well, you need a physical measure or the manufacturer restricted modes where they exist. A charging phone with no drive letter shows the storage rule is working.

Does this work on Windows 11 and Windows 10?

Yes. Microsoft documents the same removable-storage policy path and the USBSTOR value for current Windows releases, but retest after a major feature update, because policy behavior can change between builds. Microsoft notes the setting does not take effect until the PC restarts. Try it on a spare machine first if you manage several PCs.

Want storage blocking with an allow-list?

USB Block stops drives and discs, lets you authorize your own devices and logs the attempts.