Windows automatically assigns a drive letter to any connected HDD/SSD disk, USB flash drive, SD card if it recognizes the file system on its partitions. But sometimes it doesn’t work. For example, when connecting a drive, a message appears indicating that a new device is being installed, the disk appears in Device Manager, but is not displayed in File Explorer. How to manually assign a drive letter on Windows 10 and 11, or enable automatic assignment of a drive letter to new drives?
How to Manually Assign a Permanent Drive Letter in Windows?
If the drive doesn’t appear in Windows Explorer, it will have to manually assign a drive letter through the Disk Management snap-in (
diskmgmt.msc). To do this, open the Computer Management console (via the Win + X menu) and go to the Storage section -> Disk management. In the list of drives, locate the connected removable USB drive. As you can see, the disk is online, it has one healthy partition with the NTFS, but it is not assigned a drive letter. To assign a drive letter to it, right-click on the partition and select “Change Drive Letter and Path“.
In the window that appears, click the “Add” button, select “Assign the following drive letter”, select the letter you want to assign to the drive (for example, H: ) in the drop-down list, and click OK.
Make sure that Windows detects the partition (s) on the connected USB drive and the partition is formatted with the NTFS, FAT32, or exFAT file system. If the file system is detected as RAW, or the disk is not partitioned, most likely the USB flash drive is just a new one, or the partition table is damaged and you have to repair the file system first.
If the disk is new and no partitions have been created on it, it appears in the console as Not initialized with an Unallocated area. To initialize such a disk:
- Right-click on it and select Initialize Disk;
- Select the partition table for your disk: MBR or GPT;
- It remains to click on the unallocated space and create a partition (New Simple Volume) on it, select the file system, format, and assign a drive letter.
If the disk is offline, right-click on it and select Online.
Changing Drive Letter via CMD or PowerShell
You can assign or change a drive letter from the command prompt using the Diskpart tool or using PowerShell.
Open the elevated command prompt and run the command:
List the volumes on the disks:
In this example, the TestDisk volume is not assigned a drive letter (empty in the Ltr column)
Select this volume (Volume 4 in our example):
Sel vol 4
Assign a drive letter Q: to this volume:
DiskPart successfully assigned the drive letter or mount point.
End the diskpart session:
You can also change or assign a drive letter using the PowerShell cmdlets from the built-in Disk Management module.
List partitions on the specified disk:
Assign the letter Q: to partition 2 on disk 1:
Get-Partition -DiskNumber 1 -PartitionNumber 2 | Set-Partition -NewDriveLetter Q
After that, the connected USB disk appears in the File Explorer with the assigned drive letter.
Windows Doesn’t Save an Assigned Drive Letter for Connected USB Drives
Sometimes after disconnecting a USB device or restarting the computer, a drive letter is not automatically assigned to it. I have to assign the letter again manually through Disk Management, and that becomes annoying.
It seems that some feature of automatic detection and mounting of new partitions on the external storage devices is not working in Windows. How to solve this problem?
First of all, make sure that the Virtual Disk service is running. You can check the status of this service in the services management console (
SERVICE_NAME: vds TYPE : 10 WIN32_OWN_PROCESS STATE : 1 STOPPED WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0
Unable to connect to the Virtual Disk service” error).
Check if the problem persists. If it does, make sure that the automatic mounting of new volumes is enabled.
Open the command prompt as administrator and run the following commands:
Within diskpart, make sure that the automatic mounting of new volumes is enabled:
Automatic mounting of new volumes disabled.
As you can see, the auto-mounting is disabled. Let’s enable it:
DISKPART> automount enable
Automatic mounting of new volumes enabled.
You can also enable automatic mounting of new partitions using the command:
Make sure the NoAutoMount DWORD parameter (with a value of 1) is not created under the reg key
HKLM\SYSTEM\CurrentControlSet\Services\mountmgr. If this registry parameter is created, Windows doesn’t assign drive letters to newly connected devices.
To clear the saved associations of partitions with drive letters, use the command
DISKPART>automount scrub or
Restart your computer and verify if the drive letters are assigned to the external USB devices.
If not, check if the “hidden” and “do not assign a drive letter” attributes are set for the partition on the USB drive. Run the Diskpart command prompt and enter the following commands:
- List the disks:
- Find the disk number assigned to your USB flash drive (in this example 1) and select it:
select disk 1
- List the partitions on the disk:
- Select the desired partition:
select partition 2
- Check the partition attributes:
- As you can see, the “Hidden” and “No Default Drive Letter” attributes are enabled for this volume;
- Disable these attributes with commands:
attributes volume clear NoDefaultDriveLetter
attributes volume clear hidden
Volume attributes cleared successfully
- End the diskpart session by typing:
After that, this partition on the USB flash drive should be automatically assigned a drive letter on any computer.
Please note that the old Windows versions only see the first partition on USB sticks with multiple partitions. The ability to create multiple partitions on removable USB drives appeared only starting from Windows 10 build 1703. Previously, in order to make second and subsequent partitions on the USB flash drive were accessible in Windows, you had to use a trick to make Windows detect removable USB flash drive as an HDD.
If your USB flash drive doesn’t appear in the Disk Management console, try using a different USB port or cable. Try to connect the USB flash drive directly to the computer (without the USB hub), check whether the power is on and whether it is detected on other computers.