Updated: How to fix a reassigned C:/ drive letter

More than two years after I wrote this first blog entry dealing with the subject, having come up against this problem time and time again without being able to fix it, I went and did some experimenting on a PC at work to see if I could find a solution.

Short version: Instead of trying to swap the drive letters around by renaming the \DosDevices\ registry keys, I’ve discovered that if you delete the lot of them, Windows will recreate them when it next boots (as many of them as you have discrete disk drives plugged in at the time), and on the machine I tried it at work today it worked flawlessly: it reassigned the boot drive as C:\, the CD drive as D:\, the four card reader slots as E:\ through H:\ and everything was fixed.

Longer, more helpful version: If you’ve just added a hard drive to your PC (typical scenario: it’s the ex boot drive of an older PC you’ve just decomissioned, and you want the data off your old XP install) and Windows no longer boots, getting stuck instead just before the welcome screen with just the windows XP logo showing and no “Please wait” text below it, it’s very likely that XP’s suddenly developed an identity crisis of sorts and is referring to the new drive as C:\. It’s stupid, really quite illogical, and basically poleaxes that install unless you’re willing to play chicken with the registry.

Fortunately, this game of chicken is reasonably tried and true, and it’s easy enough to figure out if you’ve got even a bit of technical familiarity with your PC (as you probably are if you’ve just opened it and plugged another hard drive into it).

Hit Windows + R to bring up the Run dialog (probably you can also get to it by clicking your Start menu and then “Run…”), type regedit and hit enter. This will load the Registry Editor, which is basically a precision scope that lets you look inside your operating system’s brain. This particular registry key – HKEY_LOCAL_MACHINE / SYSTEM / MountedDevices – lists the mapping between various disk drives on your computer and their respective drive letters as visible in My Computer.

What happens is that it sometimes gets confused about how to refer to your boot volume, and if your boot volume’s drive letter changes after you install XP, it will probably get stuck partway through starting up and hang just before the Welcome/login screen.

The information here might also be of interest/use to you if that drive letter was D:\ or E:\ or something else other than C:\ from the moment you installed XP, and you want to change it back to C:\ without having to reinstall again.

The fix: Deleting each of the \DosDevices\ values shown in the registry in the above screenshot will cause Windows to recreate and reassign the drive letters in your computer. If XP’s not booting anymore, obviously you can’t just run regedit like above, but there are ways around it. There do exist commandline tools you could run from a floppy disk or something, but by far the easiest way is to grab a registry-editing liveCD of some sort. I use Mini XP on Hiren’s BootCD, but this tool should do the trick easily enough for most.

This procedure has so far worked to bring Windows XP back to life on both a customer’s PC at my work, and on my own laptop at home (on which I dualboot XP and 7 for just this sort of messing about). If you try this method, leave a comment or email me and let me know how it went!

Update 10/2: If you have programs installed to drive letters other than C:\, be aware this could wreak havoc with those. Windows may be intelligent enough to reassign the driver letters with respect to installed programs, or it may not be. I haven’t tested this, and being a rare set of circumstances I doubt I’ll ever have the opportunity to. Your best bet in that situation would be trying the old manual renaming method. Remember you could delete the DosDevices entries to fix things enough to make it bootable again, and then swap drive letters D+ to your heart’s content to get your other programs to work without reinstalling those.

One Response to “Updated: How to fix a reassigned C:/ drive letter”

  1. Jay says:

    OMG… After three days of fighting with my win7 that wouldn’t boot I’m back in business. Couldn’t have done it without you. I had just added a new 3t drive using a 3.0 usb external cradle. During the install windows lost track of the c: drive. It wouldn’t boot. Found out through the not so useful recovery program within windows that the c drive had been renamed the e: drive. But how to change it back with only access using a command prompt. I read and re-read your post. I’ve used the ResEdit before but I know how you can really mess things up. Tried it since I had nothing to lose and BAM! Rebooted after deleting the drive registry items and it started up with no problems. Will now re-add my external drives carefully. Thank you again. Best, Jay

Leave a Reply

Line and paragraph breaks automatic.
XHTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>