Does anyone know where Windows stores the drive letter assignments?

Page 1 of 2 12 LastLast

  1. Posts : 3,509
    Windows 11 Pro, 22H2
       #1

    Does anyone know where Windows stores the drive letter assignments?


    May sound like an odd question but let me explain...

    I had always assumed that it was keep locally within the Windows installation somewhere because when you plug a drive into a different computer it may get a completely different drive letter, even if the letter you gave it was available on that other PC.

    Given that, consider this scenario:

    I create bootable disks that serve multiple purposes.The first 2 partitions store a Windows image so that I can boot and install Windows from this disk.The next two partitions are just general purpose partitions that allow me to make use of the remaining space on the disk to store other data.

    Since the first 2 partitions are dedicated to installing windows, when I have the drive connected to my PC in normal usage, I really don't need to see those partitions so I use Disk Manager to remove the drive letters from those partitions.

    This is where it gets a bit odd. When I now boot from that disk, Windows setup will start, but when I get to the screen where I need to select what disk to install to, Windows setup tosses up an error saying that it can't find any disks and that a storage driver may be missing. If I boot back into windows and assign drive letters again, then it works just fine.

    Clearly, removing disk letter assignments has an effect.

    All was just to say that it got me curious about where this information is stored. Anyone know where I can find this info?
      My Computers


  2. Posts : 5,862
    Win 11 Pro (x64) 21H2
       #2

    hsehestedt said:
    May sound like an odd question but let me explain...

    I had always assumed that it was keep locally within the Windows installation somewhere because when you plug a drive into a different computer it may get a completely different drive letter, even if the letter you gave it was available on that other PC.
    That part would appear to be true. Anyway, I thought the drive letters were stored in the registry.
      My Computers


  3. Posts : 19,438
    Win 10 Home ♦♦♦19045.2311 (x64) [22H2]
       #3

    @hsehestedt

    You could use the program RegShot to see what changes in the registry, when you change a drive letter.

    GitHub - Seabreg/Regshot: Regshot is a small, free and open-source registry compare utility that allows you to quickly take a snapshot of your registry and then compare it with a second one - done after doing system changes or installing a new software product


    I also just did an Edit > Find, for.... C: ...and checked the box "Match whole string only". There were only a few results.
      My Computer


  4. Posts : 13,295
    Windows 10 Home x64 Version 22H2 Build 19045.2251
       #4

    hsehestedt said:
    Does anyone know where Windows stores the drive letter assignments?
    All was just to say that it got me curious about where this information is stored. Anyone know where I can find this info?
    HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
    - Look at the bottom of the list.
    - The entries \DosDevices\A: etc are the drive letter assignments.
    - I have successfully cleared assignments by deleting their individual entries.

    But I don't think this is what you need.
    - If you have booted from an external source, your [installed Windows] Registry is not in use.
    - When you boot from an external source, the temporary OS established by that source assigns its own drive letters without reference to your [installed Windows] Registry.
    So you need to examine whatever 'Registry' that temporary OS uses.

    Denis
      My Computer


  5. Posts : 3,509
    Windows 11 Pro, 22H2
    Thread Starter
       #5

    Try3 said:
    But I don't think this is what you need.
    - If you have booted from an external source, your [installed Windows] Registry is not in use.
    - When you boot from an external source, the temporary OS established by that source assigns its own drive letters without reference to your [installed Windows] Registry.
    So you need to examine whatever 'Registry' that temporary OS uses.

    Denis
    Bingo! That was basically my thinking, but clearly there MUST be SOMETHING stored on the disk itself because it fails when I had no drive letters assigned while in Windows, but works if I assign drive letters in windows. Weird.
      My Computers


  6. Posts : 13,295
    Windows 10 Home x64 Version 22H2 Build 19045.2251
       #6

    hsehestedt said:
    ... MUST be SOMETHING stored on the disk itself ...
    Or created as part of the temporary OS it sets up. If this is the case then it would not retain any changes you make in any subsequent boot.

    Does your disk have RegEdit.exe? No, this would not be any use to you even if it had - it would not achieve anything until it had booted.

    Does its temporary OS have RegEdit.exe?
    If so I'd suggest running it
    and having a look at its Registry entries in HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
    and having a nose around to find something that proves you are not looking at your normal [installed Windows] Registry - such as the user profiles entry
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

    Denis
      My Computer


  7. Posts : 17,831
    Windows 11 Pro
       #7

    Maybe it has something to do with the hidden folder System Volume Information?
      My Computer


  8. Posts : 494
    Win 10 Pro x64 versions
       #8

    I think the problem you face is that you are not using a Windows install file in your scenario. Are you using a WinPE here to boot the first time?

    More details about how you normally run your Windows installs would be helpful
      My Computer


  9. Posts : 3,509
    Windows 11 Pro, 22H2
    Thread Starter
       #9

    It's Windows 10 install - nothing unusual about that.

    I use this method to create the boot media since it works flawlessly for both BIOS and UEFI based systems while also eliminating the 4GB file size limitation:

    Create bootable USB installer if install.wim is greater than 4GB

    Again, it works flawlessly id drive letters are assigned, but remove the drive letter assignment while in Windows it will fail.
      My Computers


  10. Posts : 1
    Windows 7 & 10
       #10

    Are drive letters stored on the hard disc


    I have had a very similar experience with drive letters in the past week. I was building a new Windows 10 installation on a Dell 9020 desktop computer and I formatted a 500Gbyte hard disc in an external USB drive bay using my HP4520 Laptop and Partition Wizard as a simple MBR disc with two partitions formatted as NTFS and given drive letters F & G which as far as I knew were peculiar to the Windows on the machine that I was looking at the disc with, no drive information stored on hard discs as far as I knew.
    I have done this sort of thing so many times in my life without issues and I have used Partition Wizard for years. The 500Gbyte WD disc had been previously formatted as a GPT disc and had no bad sectors or CRC errors.
    The disc looked okay on the HP4520, when I tried to install Windows 10 on the Dell 9020 by booting into the Windows 10 pro on a USB drive that I use and it came back with an error message that the disc volumes were offline and it could not proceed and that I needed to use disc management?

    I attached the disc to a venerable HPxW4600 desktop that I have and looked at the disc using Microsoft diskpart utility and sure enough it also displayed all the partitions but the volumes were OFFLINE. Try as I might I could not get the volumes ONLINE. Looking at the disc with Partition Wizard on the HPxW4600 it also reported the files system as RAW type meaning it could not identify the file system.

    I Reconnected the drive directly to the Dell 9020 SATA port and I booted Active@Boot WINPE on the Dell and ran its partition manager and it also said the volumes were there but NOT READY.

    I deleted the partitions and re-created them with Active@Boot but it still reported the volumes as being OFFLINE and not available.

    I reconnected the hard disc to my HP4520 and running R-Studio disc analysis software it reported something I had never seen before, with R-Studio you can select partitions/volumes by either the assigned drive letter or the partition number, they always point to the same sector except on this disc using the assigned drive letter F it pointed to hex data that was definitely not a NTFS structure but indicated that it was the first sector 2048 bytes from the disc start, I then used the partition number in R-Studio and looking at the hex data it was different and definitely had the NTFS structure.

    The only way I could use this disc was to delete the drive letter using the HP4520 Laptop and assign new different drive letters to the two partitions and the problem went away, I could now see the disc correctly on all three computers. Bear in mind that at this stage I had not installed any operating system on this disc. Windows 10 then installed correctly on the Dell 9020 it had no problem with the hard disc and there have been no issues since.

    Booting into Active@Boot meant that there was no local registry data being used, similarly when I booted the Windows 10 installation USB drive it should not have been using any local registry data.

    So I am bewildered at this and have never experienced this behaviour before but it does suggest that Windows 7 & 10 is storing something somewhere on the hard disc to identify a drive letter as R-Studio indicated two sets of data supposedly at the same sector location depending upon whether you used the assigned drive letter or the partition number to access the sector.

    I have asked the authors of R-Studio why they allow users to either use the assigned drive letter or the partition number to access a volume but their answer was unhelpful.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 15:31.
Find Us




Windows 10 Forums