How to swap Windows drives

Great PCs take time. I don’t mean getting the hardware together: that’s actually pretty easy and mostly about opening the case, screwing everything down and plugging it all in. Initial setup isn’t difficult either. Install the OS, play with the BIOS, sprinkle in a few drivers and you’re done in an hour.

The real pain in the ass is software. Everyone has their favorites 800-pound app suites (Adobe, I’m looking at you), massive Steam libraries, obscure utilities, desktop doodads, and other ephemera woven into a boot drive tapestry that can take a few days and plenty of frustration to get together again. If there was only a way to swap Windows installs between systems…

Sysprep to the rescue

As it turns out, there is. Microsoft includes a command line utility, Sysprep.exe that strips a few customizations from a full Windows installation, allowing painless movement between hardware platforms. Sysprep has been around since the Windows NT days and works on all modern Windows PCs including Windows 10.

Sysprep is designed for use in corporate IT, but is plenty handy at home

Originally designed for large-scale hardware deployments in the IT world, the command removes the name of the PC and resets a few other internal Windows settings so moving that carefully compiled hard drive takes just a fraction of the full rebuild time. Applications, data files, and other configuration data are retained. Lost are stored passwords, browser settings, and possibly Windows activation, so keep this information and any keys or other Microsoft information handy. They may be needed later.

Windows activation keys can be retrieved from physical product packaging (you kept this, right?), a label on chassis of the PC itself or with utilities that extract them, such as Magical Jelly Bean. Win10, with digital activation, should handle this automatically via Microsoft’s servers but upgrades can cause hassles. 

Significant hardware changes, such as motherboard replacement, might require a call to Microsoft’s activation hotline to resolve. Microsoft advises that if you're running Windows 10 and added your Microsoft account and linked it to the digital license on your device, you can use the Activation troubleshooter to reactivate Windows.

Note that running sysprep.exe doesn’t create a backup or system image, so before playing around with moving drives or swappable images, perform a full backup. Microsoft only supports Sysprep.exe usage in IT environments, so don’t expect help outside of internet advice forums if things go wrong. Backing up the system registry separately isn’t a bad idea either, as this may provide a quicker fix than a full system restore should things go awry. 

 Preparing the hard disk for swap

Clean up the disk before transfer with a utility like CCleaner and download the latest drivers for the hardware on your new system. Decompress these, but don’t run them. You’ll be using those after booting up post drive swap on your new hardware. Stick to a simple folder location, such as C:\Temp, for drivers, and label everything clearly in subfolders, as decompressed packages use obscure default names. Downloading these files ahead of time and sorting them out simplifies post-boot setup considerably.

Command line

Once the drive is ready for transfer, open the start menu and type cmd. Right-click on cmd.exe when it appears at the top of the list and select Run as Administrator to bring up a command line with full administrative access. Click Ok on the User Account Control dialog box if it appears. 

From the new command line, you have two ways to proceed. You can either manually change directories to C:\ System32\Sysprep\ and type Sysprep or issue the global %windir%\System32\Sysprep\Sysprep.exe directly. 

Either brings up the System Preparation Tool with a frontend graphic user interface. Use Sysprep.exe /h for a list of options and syntax if you’re hardcore and prefer sticking with command lines and keyboards. 

 Learning the GUI: Sysprep in a suit 

There aren’t many options here, but operation is subtler than it appears. First select the “generalize” checkbox; this clears the system name and hardware configuration. Next, select “Enter System Out-of-Box Experience” from the drop-down menu. This will boot the system into Windows Welcome mode at the next start-up and initiate a plug-and-play hardware scan.

In case you’re wondering, Audit mode boots directly to the desktop, bypassing Welcome mode.

Lastly, select “Shutdown” from Shutdown options and the system will configure itself and turn off, ready for drive transfer or imaging. Note that after Sysprep.exe options are selected and the system shuts down, restarting it again on the original computer will initiate the configuration process, so be careful not to bump the power switch.

 Reboot rejuvenation

The system will reboot and enter Welcome mode, which looks like a fresh Windows installation starting up for the first time. Region, background color, privacy settings, and the rest are selected normally but you’ll need to create a fresh username on the “Your Account” screen or you’ll get a duplicate user name error. Don’t worry, your original account is still intact. All you need to do is log out of the new username created here and back to your original once the configuration process is complete. 

Create a new account here; you’ll be able to log into your old one later.

Once initial customization is finished expect a delay while Windows adjusts itself to the new hardware environment before delivering you to the desktop. From here, setup is a snap. Install any drivers or other updates required for new hardware from the folder prepared earlier, and your new rig is ready to roll, with all your old software and customizations intact. Pretty slick.

 Troubleshooting upgrade installations

While Sysprep is super handy, there are a few drawbacks and limitations. Sysprep only works three times on non-authenticated systems; you can’t reset the trial period indefinitely. Also, if you’re running an upgrade installation from a previous version of Windows without a clean install, for example Win10 installed over 8.1, you may run into error messages.  Fortunately, there is a workaround that involves a simple registry edit.

Keep a clean backup of the registry handy, open Regedit, find the HKLM\SYSTEM\Setup\Upgrade entry and remove it. Next, navigate to HKLM\SYSTEM\Setup\Status\SysprepStatus\CleanupState and change the Hex value to 7. Finally, open an administrative access level command prompt and type slmgr /dli after which Sysprep should operate normally.