Drive letters swapped after system restore (C: → D:)

67,929

Solution 1

Boot to a recovery console and use diskpart.

Just run the command diskpart

lis vol
sel vol # (select the volume number of the current C: partition [the old D:])
inactive
sel vol # (select the current D: [old C:])
active

Hopefully that will allow it to boot to the proper volume. There might be a problem with the volume D: [old C:] and may need to run a chkdsk -f on it.

Solution 2

Or go to: HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices

Remove \DosDevices\C

Source:

Then remove OS wrong disk letter in diskpart in recovery mode

list vol
select volume 0
assign remove=e
assign letter=c

Solution 3

just wanted to add a solution to this problem, since this question is one of the top google search results. Hope others find it useful!

I had to change the drive letter back to C after reinstalling windows and finding that some essential drivers assume the drive letter is C and therefore can never be installed. There is a super easy solution, and you can effectively change the drive letter back to C after reinstalling windows or whatever. Just create a symbolic link.

Right click My Computer, go to Computer Management, shrink a drive down 8MB, and create a new drive C:/.

Then just open the command prompt as administrator (type cmd into start menu, right click run as administrator), and and type commands like this, as necessary.

mklink /J "C:\Program Files" "D:\Program Files" 
mklink /J "C:\Program Files (x86)" "D:\Program Files (x86)" 
mklink /J "C:\Users" "D:\Users" 
mklink /J "C:\Windows" "D:\Windows"

Sadly, it appears that it is not possible to go directly from D to C, but this will fix any program installation issues and works for all practical purposes. But at least this works immediately with no loss of time or risk of headache.

Share:
67,929

Related videos on Youtube

Brice
Author by

Brice

Updated on September 18, 2022

Comments

  • Brice
    Brice almost 2 years

    I’ve been having problems with my Gateway desktop recently. I decided to do a system restore (in safe-mode), and the next thing I knew, the drive letter had been changed from C: to D:.

    I can’t do another system restore because the Repair PC menu only shows two options: Startup Repair and Factory Settings. I also can’t log into any accounts because they’re not listed, even in safe-mode (probably because they’re on a different drive letter). It’s now asking for a username and password that has never been created.

    Is there a way to change the drive letter back without having to log in to an account?

    • Synetech
      Synetech over 10 years
      When you say you did a system-restore in safe-mode, do you mean you actually booted Windows into Safe Mode or into System Recovery Options?
    • Brice
      Brice over 10 years
      I booted it into safe mode before having this problem (Drive swap)
    • Synetech
      Synetech over 10 years
      That’s pretty odd because for Recovery Options, you actually boot into a separate, stripped-down “PE” version of Windows and the drive letters are indeed reassigned (C: is the virtual drive for the PE OS and your regular drive is X: by default). But in safe-mode, it should not be changing drive letters at all; the system drive should appear as C: as normal. You said you had some problems before using system restore; perhaps something you used to try to fix it changed the drive letter but didn’t change it back. Had you done anything else that before the system restore?
    • Brice
      Brice over 10 years
      I uninstalled a couple programs. It could have been PowerISO, cause that was one of the few i uninstalled. After i uninstalled it (in safe mode) i restarted my PC (again in safe mode). It loaded fine that time so i decided to do a system restore. After it finished, i started having this problem.
  • Brice
    Brice over 10 years
    I'm not able to boot to the recovery console. I only get two options in repair PC.
  • jredd
    jredd over 10 years
    Do you have an OS recovery CD/DVD ? You can download an iso for Windows 7 here: msft.digitalrivercontent.net/win/X17-24209.iso
  • Will
    Will about 6 years
    Don't do this if it is your boot partition appearing as c: as then you won't get your machine to do anything!
  • StanTastic
    StanTastic over 2 years
    Just a note, it's not "assign remove=e" but "remove letter=e".