When you install a Windows program the setup routine extracts files & folders, copying them to their intended destination, adds needed registry entries, may copy the setup file itself, or a portion of it to one or more locations on the hard drive, and adds files &/or registry entries to be used to uninstall that software. Usually on 1st start, and then again when activated, the program or app itself will also write additional files/folders and registry entries. Sometimes that goes wrong – maybe a software error, or maybe your anti-virus software decided to interfere – and/or sometimes something happens later on to alter or delete one or more files and/or registry entries. Apps using Windows Installer are not only more trouble prone, but one app using it can damage other software installations that also used Windows Installer – Microsoft even developed a software tool to fix these screwups, but they eventually had to pull it when newer versions of Windows had compatibility problems. Somewhat related, no software uninstall routine removes everything, and what’s left behind can break or make installation impossible for newer versions of the same or different apps.
In this case I had an app that would not uninstall, while the same or a newer version would not install – sometimes you can cure a problem just by reinstalling the app. When that doesn’t work, after a disk partition image backup, you can often search for and delete registry keys and entries referencing the app – deleting the uninstall information in the registry can sometimes allow a reinstallation to proceed, though it may require restarting Windows first. It gets more complicated if the app installs & uses drivers for Windows services – drivers start with Windows, and if you don’t get all the driver-related registry entries Windows may not start. SysInternals [Microsoft] Autoruns can help with that, though when you jump to a registry key in Regedit, make sure to search in Regedit for that key’s name, since it may appear more than once. It *may* also help in some cases to note any CLSIDs in a key having to do with the app you’re trying to fix [a CLSID will look like this: 0F4072FC-64D1-4D09-8ECF-DDC8B14B8831], searching for keys/entries using that CLSID.
In this case that didn’t work – I wound up restoring the Windows partition from an image backup 4 times (!) because my registry edits broke Windows. The blue screen said Windows couldn’t start a boot device, so somewhere else in the registry it had to be trying to call one of those driver keys I’d deleted, but where was that key? One method to find every registry key/value added is to monitor the installation of the app in a copy of Windows where it’s never been installed. You can use InstallWatch Pro, Regshot, or Regshot2, ideally in a VM [Virtual Machine] to do that. Unfortunately using the 1st of those three I couldn’t spot anything I’d been missing – Windows is constantly reading and writing to the registry, so the challenge is determining which new entries matter and which ones are just normal Windows doing its thing. Another trick you can use it to expand or extract everything in the setup file – sometimes that’ll give you a listing of every registry key setup adds. Using Universal Extractor – the only app I know of that does that – I got the files that were added, but only a few registry keys, and none of them were something I’d been missing.
SO I decided to try somewhat of a shotgun approach… to my surprise and relief it worked. Regshot2 monitors changes to the registry by taking before & after snapshots, which it then compares. But it also does something handy, saving one .txt file with the changes and one annotated to remove or undo those added keys. I called it a shotgun approach because as above, Windows adds an awful lot of registry keys & values all on its own and undoing those might have undesired effects. But after restoring a backup 4 times, I figured restoring it one more time wouldn’t be that big of a deal. I monitored the app install using Regshot2 in a VM where the app had never been installed, then renamed the undo .txt file to .reg, double clicked it in the copy of Windows I was having problems in or with, merging it with the registry, and all those added keys/values went away. Now I could install the newer version of the app.
Regshot2 is an old app, and hard to find:
portablefreeware[.]com/forums/viewtopic.php?t=5853
archive[.]org/details/regshot-2.0.1.70
Note that while I focused on the registry, you should not forget the other files added and used by whatever app. If a copy of the setup file is copied elsewhere on the hard disk, C:\Windows\ Installer is the 1st place to look – since the file names are usually numbers, right click and check the properties, either signature or details tabs to try and ID them. You can also *usually* run one, getting the name of the app it applies to from the setup window, which you can then cancel. The 2nd place to look is in ProgramData, usually in a folder with the program’s name – if that folder exists you’ll likely see a number of other files there too. Additional files are often located in Users\ [UserName]\, Users\ [UserName]\ Documents\, Users\ [UserName]\ AppData\ Local\, & Users\ [UserName]\ AppData\ Roaming\.