How do I prevent a disk partition from being shown in Windows Explorer?

237 Views Asked by At

Assuming I have a 100GB drive and I want to put reinstallation software using 1GB. I would like that 1GB to he hidden - not from users but from the OS. Assuming Windows XP and later. Is there a series of API calls I can use to do that? What other techniques are there to 'hide' a portion of a hard drive?

3

There are 3 best solutions below

1
On

Simply assign the hidden flag to that partition. gparted does that quite well.

Alternately change its type to compaq diag.

2
On

From the first google search for "hide a drive in Windows"

How to hide a drive in Windows XP:

  1. Click Start -> Run type regedit in the box and click OK
  2. Navigate to:

      HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\
      Explorer
    
  3. From the menu, navigate to Edit -> New -> DWORD Value

  4. Name the New Value NoDrives
  5. Next, Right click NoDrives and select Modify, now check the Decimal option and under Value Data enter a decimal value for the drive you would like to hide. For example to hide C you would enter 4. See the list below for more values: * A=1 * B=2 * C=4 * D=8 * E=16 * F=32 * G=64 * H=128 * I=256
0
On

If it is GPT style disk, you can change GPT type GUID to OEM GUID. That will make that partition hidden from all the disk tools (Explorer, Disk Mgr etc).