Hide Drives in Windows File Explorer Using NoDrives
This guide explains how to hide specific drive letters from Windows
File Explorer using the NoDrives registry entry in the
Windows Registry Editor. By configuring this 32-bit DWORD value, you can
hide partitions or specific drives from the File Explorer interface
without formatting them, unmounting them, or affecting data access
through the command line or direct file paths.
Step 1: Calculate the Decimal Value for the Target Drive
Windows uses a bitmask to represent drive letters, where each drive corresponds to a power of 2 (\(2^0\) to \(2^{25}\) for letters A through Z).
Common single-drive values: * A: 1 * B: 2 * C: 4 * D: 8 * E: 16 * F: 32 * G: 64 * H: 128 * All Drives: 67108863
To hide multiple drives, add their values together. For example, to hide drive C: (4) and drive D: (8), the value is 12 (4 + 8).
Step 2: Open the Registry Editor
- Press Win + R to open the Run dialog box.
- Type
regeditand press Enter. - Click Yes if prompted by User Account Control (UAC).
Step 3: Navigate to the Explorer Policies Key
In the Registry Editor, navigate to one of the following paths depending on whether you want to apply the restriction to the current user or all users:
Current User only:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\ExplorerAll Users on the system:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Note: If the Explorer key does not exist under
Policies, right-click the Policies folder,
select New > Key, and name it
Explorer.
Step 4: Create and Set the NoDrives Value
- Right-click an empty area in the right pane of the
Explorerkey. - Select New > DWORD (32-bit) Value.
- Name the new value
NoDrivesand press Enter. - Double-click the
NoDrivesentry to modify it. - Under the Base section, select the Decimal radio button.
- In the Value data field, enter the calculated number for your specific drive(s) from Step 1.
- Click OK to save the changes.
Step 5: Restart Windows Explorer
To apply the changes without restarting your computer:
- Press Ctrl + Shift + Esc to open the Task Manager.
- Locate Windows Explorer under the Processes tab.
- Right-click Windows Explorer and select Restart.
The targeted drive letters will now be hidden from “This PC” and File Explorer.
How to Unhide the Drives
To restore visibility for the hidden drives, open
regedit, navigate back to the Explorer key,
and either set the NoDrives value data to 0 or
right-click NoDrives and select Delete.
Restart Windows Explorer to apply the restoration.