Zend certified PHP/Magento developer

How can I change Windows 10 drive letter assignments outside a full load of the OS?

I have the following disks:

C:                SSD, disk 1, boot disk
D:                HDD, disk 3, partition 1
E:                HDD, disk 3, partition 2
F:, G:, H:, I:    HDD, disk 2, partitions 1-4

I want to replace D: with a new SSD, but Windows loads various background services from that drive, so I want to avoid trying to ‘hot-swap’ the drive letter while the OS is up.

My plan was:

  • Install the new SSD, let it auto-assign to J:
  • Clone D:‘s partition to J:
  • Reboot into recovery mode
  • Use diskpart to switch drive letters for J: and D:
  • Boot back into Windows

However when I load diskpart in recovery mode, the drive letter assignment is different to when Windows is loaded – it’s defaulting to auto-assigning by-device-then-partition, eg D: is assigned to disk 2, partition 1.

How can I edit the drive letter assignments that Windows uses once loaded, but without loading it?