Windows Hide Some Drive in This PC: Hide, Block Access, and Restore Any Drive

Windows hides a drive from This PC through Group Policy, the NoDrives registry value, or drive-letter removal. These options differ in which users see the drive and whether the path still resolves. This guide gives exact steps, bit values, limits, and when to use permissions or encryption instead.

By Delores    Updated on November 26, 2026

Quick Answer

Windows can hide a drive from This PC without deleting any files. The three built-in routes are the Hide these specified drives in My Computer policy, the NoDrives registry value behind it, and removing the drive letter in Disk Management. Each changes visibility, not file permissions. If the goal is to hide drives in Windows 11 from other users, the setting must be scoped to those users; a local policy applied to your own account changes only what you see.

That distinction matters. Microsoft documentation states that the hide policy removes drive icons from My Computer, Windows Explorer, and program Open dialogs, but does not stop users from reaching the same volume through other programs or Disk Management. Choose among the methods below according to whether you want a cleaner Explorer view, a different view per account, or an actual access restriction.

Can I Hide Disk E in File Explorer in Windows 11?

 

Hide a disk E: in "Computer" view of Windows Explorer

I know how to hide a volume with DISKMGMT.MSC (right-click, Change Drive Letter and Paths, and remove the drive letter), but here I want something a little bit different:

I would like to still have the disk mounted as E: (thus we can launch a program there, we can access it via cmd.exe, symlinks to E:\mydirectory\ will still work, etc.) but just not see it in the Computer Explorer view. How to do this?

I'm an admin, and there is only 1 user account.

- Question from superuser.com

What Hiding a Drive in This PC Actually Changes

Visibility Layer: NoDrives and the Hide Policy

The Hide these specified drives in My Computer setting writes the NoDrives value under HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer. It is a 32-bit number whose lowest 26 bits map to drive letters A through Z, with A as the rightmost bit. Setting a bit to 1 removes that letter's icon; setting it to 0 restores the icon. Microsoft's registry reference lists 0x4 for C only, 0x8 for D only, 0xF for A through D, and 0x03FFFFFF for all 26 drives. Group Policy writes the value for you; deleting it or choosing Do not restrict drives makes all drives visible again.

The scope is deliberately small. The policy hides drives from My Computer and File Open dialogs; it is not an access control mechanism. For a real block, set an access control list on the drive or folder.

Access Layer: Prevent Access to Drives from My Computer

A separate policy, Prevent access to drives from My Computer, changes behavior rather than icons. Microsoft states that when it is enabled, users cannot view selected drive contents in My Computer or File Explorer, and cannot use the Run dialog, the Map Network Drive dialog, or the Dir command to list those directories. Drive icons remain visible; double-clicking produces a policy message. The policy also stops applications from using the Windows.Storage file API on those drives. It still does not prevent programs in general from reaching local or network drives, and it does not lock Disk Management.

Path Layer: Removing the Drive Letter

Removing a drive letter is a different operation: the volume stays intact but no longer has a path such as E:. File Explorer, Run, and typed paths all stop resolving it until the letter is assigned again. This affects every account on the machine and can break installed programs, backup jobs, and recovery tools that reference the letter. It is not encryption; the data remains readable by any tool that can address the volume directly.

How to Hide Drives in Windows 11 from Other Users with Group Policy

Use this approach on Windows Pro, Enterprise, or Education editions when different accounts need different views of drives. The policy is user-scoped: it applies where the account lives, not where the disk lives. In a domain, link the GPO to an organizational unit containing only the target users; on a standalone PC, configure the local policy separately under each account, or write the HKCU registry value via a logon script.

Steps:

1. Sign in with an administrator account, press Win + R, type gpedit.msc, and press Enter.

2. Navigate to: User Configuration > Administrative Templates > Windows Components > File Explorer.

3. Double-click "Hide these specified drives in My Computer".

4. Select Enabled, then choose the drive(s) to restrict from the drop-down (e.g., "Restrict D drive only"), click Apply, and OK.

5. Then run gpupdate /force in an elevated Command Prompt, or sign out and back in.

6. Switch to the affected user account and confirm the drive is absent from This PC.

Additional steps for a domain environment: In Active Directory Users and Computers, create an OU and move the target users into it. In Group Policy Management, create a policy (e.g., "Hide F Drive") and link it to that OU. Edit the policy and perform steps 2–4 above. Run gpupdate /force, then have the target users sign in again to verify.

Important caveats: 
Microsoft's documentation states that this policy only removes the drive icons from My Computer, Windows Explorer, network locations, and the Open dialog of programs. It does not prevent users from accessing the drive by path through other programs (such as Command Prompt or third-party file managers), nor does it stop users from viewing or changing drive properties via Disk Management. 
Microsoft recommends against editing WindowsExplorer.admx directly, because a service pack can overwrite the built-in file. Instead, create a new .admx file and import it into the GPO. 
Always verify the result from the target user account, not from the administrative account used to configure the policy—user settings do not follow the administrator's session.

Hide These Specified Drives in My Computer Group Policy: Custom Bit Values

The standard Group Policy interface only provides 7 preset combinations and does not support directly entering custom bit values in the graphical interface. To achieve custom hiding (such as hiding only F drive or F+G drives), you must use the registry NoDrives value, or create a custom ADMX template. Microsoft KB 231289 shows how to add others.

Method 1: Registry NoDrives (Most Direct, Supports Arbitrary Combinations)

The NoDrives value affected by Group Policy is essentially a 26-bit binary number, where each bit corresponds to a drive letter (A=bit 0, B=bit 1, ... Z=bit 25). Simply sum the values of the drive letters (Decimal) you want to hide and fill in the total.

Letter Decimal Value Letter Decimal Value Letter Decimal Value Letter Decimal Value
A 1 B 2 C 4 D 8
E 16 F 32 G 64 H 128
I 256 J 512 K 1,024 L 2,048
M 4,096 N 8,192 O 16,384 P 32,768
Q 65,536 R 131,072 S 262,144 T 524,288
U 1,048,576 V 2,097,152 W 4,194,304 X 8,388,608
Y 16,777,216 Z 33,554,432        

Steps:

1. Press Win + R, type regedit, and press Enter.

2. Navigate to:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

(If the Explorer key does not exist, right-click Policies > New > Key, and name it Explorer)

3. In the right pane, right-click > New > DWORD (32-bit) Value, and name it NoDrives.

4. Double-click NoDrives, select Decimal, and enter the calculated total. (Here we hide E, so input 16)

5. After logging out and logging back in (or restarting Explorer), the setting takes effect.

Method 2: Custom ADMX (Suitable for Domain Environments, Making Custom Combinations Appear in Dropdown List)

If you need users to select custom combinations from the Group Policy dropdown list, you can create a new ADMX file and import it, rather than modifying the built-in WindowsExplorer.admx (which may be overwritten by system updates).

Core Principle: In the custom ADMX, define the NoDrives value items in the DROPDOWNLIST, and use VALUE NUMERIC to specify the sum of bits for each custom combination. For example, to add "Restrict F drive only" (32) and "Restrict F and G drives" (96) options.

Critical Limitations: 
The "Hide these specified drives in My Computer" policy (and the corresponding NoDrives value) only removes drive icons from File Explorer, "My Computer", and standard open dialogs. It does not prevent users from accessing the drive by typing the path (such as F:\) in the Run dialog, Command Prompt, or third-party file managers, nor does it prevent users from viewing drive information in Disk Management.
If you need to truly restrict access, you should use the "Prevent access to drives from My Computer" policy (corresponding to NoViewOnDrive), which will block access attempts.

Prevent Access to Drives from My Computer Registry and Policy

When hiding the icon is not enough, use the access policy instead of, or alongside, the hide policy. Microsoft's registry reference records the corresponding value, NoViewOnDrive, as a REG_DWORD under HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer. Group Policy is the supported way to set it.

1. Open gpedit.msc and go to User Configuration > Administrative Templates > Windows Components > File Explorer.

2. Open Prevent access to drives from My Computer and set it to Enabled.

3. Choose the drive or drive combination from the dropdown and click Apply and OK.

4. Refresh the policy, then test both a double-click in File Explorer and a typed path in the Run dialog.

5. To restore access later, set the policy to Disabled or Not configured.

Tips: Icons remain visible under this policy, so users will see the drive and hit a policy message. If you want them not to know the drive exists, enable both policies; if you need confidentiality, use permissions or encryption instead.

When Group Policy Hiding Fails: Fallback on Windows Home

Windows Home has no Local Group Policy Editor. Removing the drive letter works on every edition and hides the volume from all accounts, which is stronger but less selective.

1. Press Win + X and choose Disk Management.

2. Right-click the target volume and select Change Drive Letter and Paths.

3. Select the letter, click Remove, and confirm Yes.

4. Check that the letter is gone from This PC and that no application reports a missing path.

5. To restore it, right-click the now-letterless volume, choose Change Drive Letter and Paths, click Add, and assign the original letter.

Tips: Never remove the letter from the System, Boot, EFI, or Recovery partition, and write down the original letter first. Windows may warn that the volume is in use; close the program holding a file before accepting.

Command-Line Alternative

For scripted environments, DiskPart can do the same job: run diskpart, list volume, select volume m, remove letter E, and exit. The mountvol command offers another route; Microsoft documents mountvol /d as removing a volume mount point from the specified folder.

Tips: DiskPart selects volumes by number, not by letter. Re-run list volume immediately before select volume so a changed volume index cannot make you modify the wrong partition.

How to Show a Hidden Drive in This PC Again

When a drive disappears from This PC, restore it with the reverse of the method that hid it. The right path depends on whether the change came from a Group Policy setting, the NoDrives registry value, or a removed drive letter. Always work from the account where the drive should reappear.

Restore a Drive Hidden by Group Policy

1. Sign in with an administrator account, press Win + R, type gpedit.msc, and press Enter.

2. Go to User Configuration, Administrative Templates, Windows Components, and File Explorer.

3. Open Hide these specified drives in My Computer, choose Not configured or Disabled, and click Apply and OK.

4. Run gpupdate /force in an elevated Command Prompt, then sign out and back in.

5. Confirm the drive is visible again in This PC from the affected user account.

Tips: If the drive stays hidden, a domain GPO is probably reapplying the setting. Check the policy linked to that user's organizational unit instead of repeatedly deleting the registry value.

Restore a Drive Hidden by the NoDrives Registry Value

1. Press Win + R, type regedit, and press Enter.

2. Navigate to HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer.

3. Delete the NoDrives DWORD, or set its value to 0 to show all drives.

4. Close Registry Editor, sign out, and sign back in.

5. Open This PC from the same account where you changed the value.

Tips: Deleting the value reveals every hidden letter. If several drives were hidden on purpose, set the original decimal value again instead of removing it.

Restore a Drive with a Removed Letter

1. Press Win + X and choose Disk Management.

2. Right-click the volume that has no letter and select Change Drive Letter and Paths.

3. Click Add, choose Assign the following drive letter, and select the original letter.

4. Click OK and confirm the drive appears in This PC.

Tips: Reassign the same letter used before hiding it, because applications, backup jobs, and saved paths may reference that letter. If it is now taken, update those references after assigning a different one.

When a Partition Is Deleted Instead of Hidden: Recover It with MyRecover

The methods above change visibility only. They do not delete the volume or its files. If a partition disappeared because it was actually deleted in Disk Management, or if a drive letter change went wrong and the data is no longer accessible, hiding settings cannot bring it back. In that case, a graphical recovery tool is safer than continuing to edit the disk layout by hand.

MyRecover is a Windows data-recovery tool for deleted files, formatted drives, and lost partitions. Its Partition Recovery workflow is designed for a partition that was removed from the disk, and it shows candidate capacity, file system, start and end sectors, plus a Primary or Logical marker so you can match the original layout before proceeding. You can download MyRecover for Windows from the official site.

Use this procedure when a partition is missing rather than merely hidden:

1. Stop writing to the affected disk immediately; new files or installed software can overwrite the data you want back, and install MyRecover on a different drive from the one being scanned.

2. Launch MyRecover and pick Partition Recovery from the scenario list.

3. Select the disk that contained the missing partition and hit Scan. Use Fast Search first, then Full Search if the target partition does not appear.

4. Read each candidate by capacity, file system, and start and end sectors, and use the Primary or Logical marker to match the original layout. Tick the partition you need and press Proceed.

All the partitions and their files are recovered in the original location. Check them now.

Notes: 
Stop using the affected disk as soon as you notice the loss. Installing the tool or saving recovered files back onto the same disk is the most common way to make recovery harder. 
If the partition is visible but reports as RAW, choose the workflow that matches an unformatted volume instead of Partition Recovery. 
For unlimited file recovery, please upgrade to MyRecover Professional or Technician to unlock.
MyRecover
  • Recover Deleted Files Easily with Simple Clicks
  • 1000+ File Formats Supported
  • Supports HDD, SSD, External Hard Drive, USB Drive, SD Card, etc.
  • Quickly Find Files Using File Types, Name, Size, etc.
  • Preview Files Before Recovering
  • Recover Unlimited Data

FAQs About Windows Hide Some Drive in This PC

Does hiding a drive in This PC protect the files from other users?
 
No. It changes visibility in File Explorer and Open dialogs. Microsoft states that users can still reach the drive by typing a path in Run, the Map Network Drive dialog, or a command window. Use NTFS permissions or BitLocker to protect it.
Can I hide drives in Windows 11 from other users without Group Policy?
 
How do I hide drives in Windows 10 Group Policy on Home edition?
 
Why did my registry value come back after a reboot?
 
Will programs on a hidden drive still run?
 
What is the difference between the two drive policies?
 

Conclusion

To hide some drives in This PC on Windows, choose by scope: the Group Policy or NoDrives value for per-user visibility, the companion access policy when Explorer and Run must also be blocked, and drive-letter removal when every account should lose the path. None of these methods encrypt data. Confirm the result from the account you intended to restrict, and keep a record of the original letter or decimal value so you can reverse the change.

Delores · Editor
Delores is one of MyRecover's senior editors. She is knowledgeable in data recovery for phones and PCs as well as other solutions for data preservation. She enjoys assisting readers with issues related to disaster recovery and data corruption. She enjoys traveling, shopping, and other lovely pursuits.