In Windows 10, when you connect a removable storage device (i.e. a USB stick or external drive) or even when you insert a new internal hard drive or SSD into your PC, the system automatically detects and assigns a drive letter to make it usable .
The assignment of the letters to the computer disks can still be controlled manually, which becomes useful to be able to recognize the drives more easily and to prevent the system from assigning a different letter each time the USB pen or external drive is connected.
If you want to display the same drive letter, always, on a particular device, it is possible manually assign and change letter to any disk or key or smartphone connected to the computer, and on Windows, you can do this in at least three different ways, using Disk management, Command Prompt and also, in Windows 10, with PowerShell.
In this guide for Windows 7 and Windows 10 PCs we also make sure that you do not change the letter to the installation disk (typically with the letter C) and that you do not set a letter that is already in use, which can cause conflicts.
How to assign a drive letter using Disk Management
To manage drive letters with the Disk Management tool, which I have already talked about, let's see what the steps are:
Open the Start menu, search for Disk Management to find the Create and Format Hard Drive Partitions utility.
Right-click on the drive you want to change and choose the Change Drive Letter and Path option.
Click on Change and then next to the option Assign this drive letter, choose the letter to use to recognize that disk or USB stick or external drive.
Press OK and then OK again to save.
Once these steps are completed, the drive will permanently retain the assigned letter, even after reconnecting it.
If you connect the key or external drive to another PC, it may receive a different letter.
How to set the letter to internal or external drives using the command prompt
Although the easiest way to assign a new drive letter is by using Disk Management, you can also use the DiskPart command in Command Prompt to do the same thing.
Then open the Start menu, search for the command prompt, press on it with the right mouse button and click on the option Run as administrator.
At this point, write and execute (pressing Enter after each command) the following commands.
To start the Diskpart tool.
To list all available volumes.
select volume 3
To select the volume (drive) to assign a new letter to (i number 3 is just an example here)
To assign the letter Z to the drive
After completing these steps, every time you reconnect the disk or USB drive to the same device, Windows 10 should automatically assign it the same letter.
How to change disk letter using PowerShell
From the Windows 10 Start menu, search for PowerShell, right-click and then use the Run as administrator option.
Then run the following commands by pressing Enter after each one.
To list the available units
Get-Partition -DiskNumber 1 | Set-Partition -NewDriveLetter Z
To assign the letter Z to drive 1
In the command, be sure to change "1" to the number that represents the disk you want to change letter to and choose the letter you prefer instead of "Z", as long as it is not already assigned to another drive.
Once the steps are completed, the drive will be accessible via File Explorer using the letter it was assigned and Windows 10 will not attempt to change it.
To prevent the system from trying to assign the same letter to another drive, we recommend that you start by adding letters in reverse order.
For example, instead of using D, E or F, it would be better to start with Z, Y or X when assigning a new letter.
Finally, keep in mind that if C is usually the letter of the hard disk, the letters A and B are also special and it would be better not to use them.
We talked about this in another article explaining what the letters A and B are for on Windows and why it would be better to leave them free.
Also, the letter D is usually assigned to CD Rom or DVD Rom drives, so it too would be best left as it is, even on a laptop without a CD player.
Be careful not to change the letter to internal disks where applications and programs are installed, which otherwise will no longer work.