Computer >> Computer tutorials >  >> System >> Windows 11

Windows Doesn’t Automatically Assign Drive Letters

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“.

Windows Doesn’t Automatically Assign Drive Letters

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.

Windows Doesn’t Automatically Assign Drive Letters

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:

  1. Right-click on it and select Initialize Disk;Windows Doesn’t Automatically Assign Drive Letters
  2. Select the partition table for your disk: MBR or GPT; You can convert MBR-disk to GPT without data loss.
  3. 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.Windows Doesn’t Automatically Assign Drive Letters

If the disk is offline, right-click on it and select Online.

Windows Doesn’t Automatically Assign Drive Letters

If the disk goes offline every time you restart Windows, fix it using the guide “The disk is offline because of policy set by an administrator”.

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:

Diskpart

List the volumes on the disks:

List vol

In this example, the TestDisk volume is not assigned a drive letter (empty in the Ltr column)

Windows doesn’t automatically assign a drive letter to the hidden System Reserved partition and the boot EFI partition.

Select this volume (Volume 4 in our example):

Sel vol 4

Assign a drive letter Q: to this volume:

Assign letter=Q

DiskPart successfully assigned the drive letter or mount point.

End the diskpart session:

Exit

Windows Doesn’t Automatically Assign Drive Letters

You can also change or assign a drive letter using the PowerShell cmdlets from the built-in Disk Management module.

List drives:

Get-Disk

List partitions on the specified disk:

get-disk 1|Get-Partition

Assign the letter Q: to partition 2 on disk 1:

Get-Partition -DiskNumber 1 -PartitionNumber 2 | Set-Partition -NewDriveLetter Q

Windows Doesn’t Automatically Assign Drive Letters

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 (services.msc).

Windows Doesn’t Automatically Assign Drive LettersAlso, you can check the service from the command prompt:
sc query vds

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

Windows Doesn’t Automatically Assign Drive Letters

Or check the service state using PowerShell:

get-service vds

Windows Doesn’t Automatically Assign Drive Letters

If the service is stopped, start it from the graphical snap-in (Start button) or using the command:
net start vds
Windows Doesn’t Automatically Assign Drive Letters

Tip. In some cases, for the Virtual Disk service to work correctly, you have to change its startup type to Automatic (check the article “Unable to connect to the Virtual Disk service”).

Check if the problem persists. If it does, make sure that the automatic mounting of new volumes is enabled.

Note. When the automount is enabled, Windows automatically mounts the file systems of new drives connected to the computer and assigns drive letters to the partitions. If the automount is disabled, Windows detects new drives but doesn’t automatically mount them or assign drive letters to the new volumes.

Open the command prompt as administrator and run the following commands:
diskpart
Within diskpart, make sure that the automatic mounting of new volumes is enabled:
DISKPART> automount

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.

Exit diskpart
DISKPART> exit

Windows Doesn’t Automatically Assign Drive Letters

You can also enable automatic mounting of new partitions using the command:

MOUNTVOL /E

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.

Note. By the way, the automount is also responsible for making Windows remember the drive letters assigned to the removable drives. The automount feature will assign the same drive letters the next time the USB drive is connected to your computer (of course, if these letters are not busy). A list of saved drive letters assigned to partitions is stored under the registry key HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices.

Windows Doesn’t Automatically Assign Drive Letters

To clear the saved associations of partitions with drive letters, use the command DISKPART>automount scrub or mountvol /r.

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:

  1. List the disks: list disk
  2. Find the disk number assigned to your USB flash drive (in this example 1) and select it: select disk 1
  3. List the partitions on the disk: list part
  4. Select the desired partition: select partition 2
  5. Check the partition attributes: attributes volume
  6. As you can see, the “Hidden” and “No Default Drive Letter” attributes are enabled for this volume;Windows Doesn’t Automatically Assign Drive Letters
  7. Disable these attributes with commands:
    attributes volume clear NoDefaultDriveLetter
    attributes volume clear hidden
    Volume attributes cleared successfullyWindows Doesn’t Automatically Assign Drive Letters
  8. End the diskpart session by typing: exit

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.