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

  1. Press Win + R to open the Run dialog box.
  2. Type regedit and press Enter.
  3. 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:

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

  1. Right-click an empty area in the right pane of the Explorer key.
  2. Select New > DWORD (32-bit) Value.
  3. Name the new value NoDrives and press Enter.
  4. Double-click the NoDrives entry to modify it.
  5. Under the Base section, select the Decimal radio button.
  6. In the Value data field, enter the calculated number for your specific drive(s) from Step 1.
  7. Click OK to save the changes.

Step 5: Restart Windows Explorer

To apply the changes without restarting your computer:

  1. Press Ctrl + Shift + Esc to open the Task Manager.
  2. Locate Windows Explorer under the Processes tab.
  3. 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.