I was recently faced with the dreaded prospect of re-installing Windows 10. While the standard advice on many websites is to do a clean install of Windows to solve many problems, I have gone through great lengths in the past to avoid doing so. I have many programs and settings built up over many years which I dread having to redo. In addition, my computer has a complicated dual boot process with a Hackintosh install which is threatened by any Windows install.
However, after my Windows 10 updates started failing, and after exhausting all solutions I could find, I gave in and decided I would try an in-place re-install. I clicked through the Windows Install Media wizard hoping to be able to reinstall Windows and keep my current settings and programs.
Unfortunately the Windows Setup Wizard disabled the “Keep Settings” and “Keep Programs” options – the only option allowed was a full install wiping out my Windows drive. Again I searched the tech forums in vain. All the offered solutions failed. Finally I gave up and decided to do a clean wipe. Thankfully, following the below steps, I was able to reinstall my system nearly perfectly to what it was before my problems began.
Windows User Profile Migration Tool (USMT Gui)
This Windows User Profile Migration tool by Nick Rodriguez is a graphical front-end to an all but secret (at least to the average Windows user) Microsoft migration utility called USMT.
Nick’s profile wizard will backup all of your Windows user accounts containing all your settings, plus any folders that you specify. This worked nearly perfectly for me but the instructions are a little hard to understand as I think they are intended for an over network migration rather than local.
Another tool for moving your profile is Forensit’s Trans Wiz and it’s companion User Profile Wizard. But my attempt at using both failed while Nick’s wizard worked perfectly.
- Prior to doing anything, make a full backup of your Windows drive ! Use software that will allow you to browse your backup image in case you need to restore individual files. I used the free version of Minitool Shadowmaker.
- Of course, read and follow Nick’s github Readme
- The first tab “Old Computer” on Nick’s tool is for backing up, the second tab “New Computer” is for restoring. Do one at a time, not both. When the options are correctly set, the “Migrate” button on the particular tab will become active.
- Make a copy of the “.MIG” file produced from Nick’s tool when backing up. Nick mentions on one of his posts that the file will be deleted by the tool on recovery. I didn’t experience this but you may so make sure you have a backup.
- When backing up, UNcheck the “Save on New Computer” box (Old Computer Tab) and when recovering UNcheck the “Save State Source” (“New Computer”). I believe keeping it checked is only for migrations over a network.
- When the Windows install asks you for a User account, provide a name and password with the understanding that this initial account will be temporary and deleted once you import the old profiles.
- After installing Windows, enable the hidden Windows Administrator account. Log out of the temporary user account you created above which was used for the initial install, log into the Administrator account, and delete the temporary user account. From the Administrator account download and run Nick’s profile wizard.
- If recovery using Nick’s GUI doesn’t work – try this command in an admin command Console which worked for me (adopted from some obscure Microsoft documentation). Use from within the amd64 directory in elevated Powershell:
|
./loadstate "[path to MIG file]" /i:"[path to config.xml]" /lac /lae /l:"[path to FilesMigrated.log]" /c |
I used this only because I didn’t uncheck the “Save State Source” checkbox so the Migrate button on the “New Computer” tab in Nick’s wizard was disabled. I found out after the fact that I had to have the box unchecked in order for the Migrate button to work.
Prior to Reinstall, Export List of Installed Windows Programs Using UninstallView
Prior to installing Windows, export a list of all of your installed programs. I did this using Nirsoft’s UninstallView. Use the Options dropdown to toggle the appearance of Windows Apps. Click View -> HTML Report – All Items to see an HTML export of the list. Save to a safe place (not the Windows drive!). If you use Chocolatey or similar command line tool export a list of the currently installed programs so you can reinstall them later using the same tool.
Convert UninstallView Html Export to Chocolatey Import File
I opened the UninstallView html list in Notepad++. I selected Find->Replace using
|
"<td.*?>(.*?)</td>.*?/tr><tr>" |
in the Find box and
in the Replace box. I then checked “Regular expression” and
.
Here’s what my find/replace dialog looked like:
I clicked “Replace All” – the uninstall list converted to a list of files in more or less Chocolatey format. I then hand edited to delete irrelevant html, and added the Chocolatey tags to the top:
|
<?xml version="1.0" encoding="utf-8"?> <packages> |
and bottom:
I then replaced spaces with hyphens and deleted version numbers of programs so the file now looked something like this:
I could have automated some of that but didn’t bother. I then saved this as “program_list.config”.
Reinstalling Windows Programs Using Chocolatey
After installing and updating Windows, and recovering the Windows profiles using Nick’s tool above, I logged in with my old account, fed the program_list.config to chocolatey and let it go to town installing my programs:
|
choco install program_list.config -y |
Surprisingly, Choco showed very few errors. Most of those I did experience were because the Choco packages were named differently in Choco’s repository or they were not available (e.g., commercial software). I reran Choco with the correct names for those programs erring out and/or installed the applicable commercial packages.
Restoring Custom Tasks in Task Scheduler
I had several scripts running in Windows Task Scheduler. On my old install they existed in “C:\Windows\System32\Tasks”. So on recovery, I mounted my MiniTool Shadowmaker image to a mapped drive, and imported the scripts into Task Scheduler. I did this by going to Action->Import Task and then browsed to the “C:\Windows\System32\Tasks” folder on the mounted Shadowmaker image and imported the scripts.
Problems Encountered
Most of the problems I encountered had to do with the Windows Start menu. I’ve gotten into the habit of pressing the Windows key, and the first few letters of a program to launch. Unfortunately Chocolatey doesn’t always produce a shortcut in the Start Menu. So I had to manually add a shortcut to the start menu.
I also encountered problems with Windows Powershell complaining it couldn’t find cmdlets. Confusingly, there are 2 powershell versions, Powershell 5.1 which MS is apparently trying to deprecate, but still installs with windows, and Powershell Core (Version 7) which apparently is the only version which is getting updates. I had to install Powershell Core version 7 (rather than the default 5.1) in order for my scripts to work properly as 5.1 was giving command not found errors.
Drivers – two drivers for my Western digital drives did not install properly. Open up Device Manager and make sure all your drivers installed properly and there are no warnings or exclamation points. Install drivers from manufacturer websites. I also had to go to the Nvidia website and update my driver for my ancient GT710. Choco seemed to have installed it but I didn’t trust the choco install as I was experiencing some slowness.