How to Hide or Dismount a Partition in Windows

Do you need to hide or dismount a partition so that Windows can no longer view it and write files on it? If that’s the case, then you are in luck. This tutorial shows how to do this both from Computer Management and the Command Prompt. It also shows how to mount back (unhide) partitions, in case you need to use them again.

Why Would you Want to Hide a Partition?

The reasons can vary, depending on your context:

  • If you have a computer with multiple operating systems installed, which is accessed by more than one person, you might want certain partitions to be available only to some operating systems and certain people.
  • If you are working as a system admin, you might want to hide the partition containing recovery tools on each computer on the network.
  • You want to pull an April Fools prank and hide a partition from being accessed by other people using the same computer & operating system.

When you hide (dismount) a partition in Windows (any version), the setting you made is remembered until you manually unhide (mount) that partition. The partition will be invisible to all the user accounts defined on that operating system and will continue to exist with its content intact. If you have other operating systems installed on the same computer, for which the partition is not hidden, the user accounts defined on those operating systems will be able to use the partition.

Hiding (Dismounting) the Partition from Disk Management

First, you need to open Disk Management or Computer Management and access the Disk Management section. We showed how to do this, in an older tutorial: How to Manage Your Disks using the Disk Management Utility.

There you can see a list with all the partitions existing in your computer.

Disk Management

Right click on the partition you want to hide (dismount) and select "Change Drive Letter and Paths".

Disk Management

In the "Change Drive Letter and Paths" window, click on the Remove button.

Disk Management

You are asked to confirm the removal of the drive letter. Click Yes.

Disk ManagementNOTE: If there are open applications using files from the partition, you are warned that the drive is in use. Make sure you close all the applications that might be using files from that partition and then click Yes, to continue the drive letter removal operation.

Disk Management

The partition is now hidden (dismounted) and it is no longer accessible from the operating system you are currently using. Windows will remember the setting you just made, at each login and the partition will never be available to users, unless you choose to unhide (mount) it.

Hiding (Dismounting) the Partition from the Command Prompt

You can achieve the same result from the command line too. Simply run as administrator a Command Prompt instance.

Then type the following command: mountvol drive letter /D. Replace the "drive letter" text with the actual letter of the drive you want to hide (dismount). I wanted to hide partition "D:" so I typed mountvol D:\ /D. The /D argument stands for dismount.


If you need help with understanding all the command line parameters for mountvol, simply type mountvol /? and you will get detailed help.

NOTE: If you don’t run the Command Prompt with administrative privileges, the command won’t work.

Unhiding (Mounting) the Partition from Disk Management

If you want to unhide (mount) a partition and make it available again, open Disk Management and right click on the partition. Then, select em>"Change Drive Letter and Paths", just like you did to hide it in the first place.

In the "Change Drive Letter and Paths" window, it is shown that the partition has no drive letter assigned. To make it visible again, it needs a drive letter. Click the Add button.

Disk Management

From the "Assign the following drive letter" drop-down box, select the driver letter you want to assign. It can be the old one it use to have or a new one. When done, click OK.

Disk Management

The partition is now visible again and can be accessed by users defined on the current Windows installation.

Unhiding (Mounting) the Partition from the Command Prompt

Run as administrator a Command Prompt instance. Then, type mountvol /?.

You will first see a list with all the command line parameters available for mountvol and what they do. Scroll down below, to see all the possible values for VolumeName. There you will have a list with all your partitions and their assigned drive letters, if assigned.

Command Prompt

Look for the entries where you find the text "NO MOUNT POINTS", as shown below. Those entries represent hidden (unmounted) partitions, which can be unhidden (mounted) again.

Command Prompt

To mount a partition type: mountvol drive letter VolumeName. The text "drive letter" should be replaced with the letter you want to use (e.g. D: E: F:). Make sure you assign driver letters which are free and not taken by other partitions. VolumeName should be replaced by the text which starts with "\\?\Volume{". Make sure you write the complete and correct value. Also, pay attention to the case used for each letter. The command is case sensitive - using the wrong case only for one letter, will cause the command to fail.

Command Prompt

If the command was executed correctly, you won’t receive any messages. The partition will simply show up in Windows Explorer.


As you can see, hiding and unhiding partitions is simpler than you would expect. If you have any questions about the procedure, don’t hesitate to ask below.