How to permanently remove the drive letter and hide the OEM Partition in Windows 10?

  1. Run PowerShell with administrator privileges

    Search -> powershell

    Windows PowerShell -> Right click -> Run as administrator

     

  2. List partitions with drive letters

    GET-WMIOBJECT win32_logicaldisk | FORMAT-TABLE

    Make a note of the drive letter that you would like remove. You will need this later to permanently remove the drive letter.

    Here we are removing the letter F:

     

  3. Open Diskpart

    Hom diskpart in PowerShell then press Enter

     

  4. List the disks on your PC

    Hom lis dis after DISKPART> and press Enter

    Output:

      Disk ###  Status         Size     Free     Dyn  Gpt
      --------  -------------  -------  -------  ---  ---
      Disk 0    Online          476 GB    10 MB        *
      Disk 1    Online          931 GB      0 B        *
      Disk 2    Online         3726 GB      0 B        *
      Disk 3    Online            8 GB      0 B        *
    

     

  5. Select the disk that contains the partition for which you would like to remove the drive letter

    Here we are selecting Disk 0

    sel dis 0

     

  6. List the partitions on the selected disk

    lis par

    Output:

      Partition ###  Type              Size     Offset
      -------------  ----------------  -------  -------
      Partition 1    Recovery           300 MB  1024 KB
      Partition 2    System              99 MB   301 MB
      Partition 3    Reserved           128 MB   400 MB
      Partition 4    Primary            475 GB   528 MB
      Partition 5    Recovery           450 MB   476 GB
        

     

  7. Select the partition that requires the removal of the drive letter

    Here we are selecting the Recovery partition 5

    sel par 5

     

  8. Remove the drive letter for the partition

    remo

 

The above will remove the drive letter. Qhov rais will reassign the drive letter on reboot as the drive letter assignment will be in the registry.

If you would like to permanently remove the drive letter, then the registry needs to be modified.

IMPORTANT NOTE: Modifying the registry incorrectly can permanently damage your computer. Please backup the registry and important files before continuing.

  1. Open the Registry Editor

    Search -> regedit

    Click yes for the User Account Control prompt

     

  2. Navigate to the branch for drive letter assignment in the Registry Editor

    Computer\HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices

    Find the letter that you would like to remove from the list

    Here we are removing the drive letter F:, therefore we want to delete \Dos\Devices\F:

    Right click the entry that you would like to delete -> Delete

     

  3. Restart the PC to apply the changes

     

sau ntawv cia