1

When you uninstall a program, Windows finds all the programs files, and deletes them, where does it store the file containing, all the paths of these files? (Specifically Windows 7). Sorry, if this is a duplicate, it is hard to word this question :)

EDIT #1: I saw this, but I want to know for all programs, not just .msi's.

2 Answers2

1

The location of uninstall information can vary depending on the program. For some programs, e.g., the ones you see under "Uninstall or change a program", if you attempt to uninstall a program through the Control Panel, you can find the program that will uninstall software under the Windows registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall or HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall. Some may be under one of those locations in the registry while others may be under the other registry location.

You can run the registry editor program regedit and browse to those locations in the registry. If you look at the keys for a particular program, you may see one named UninstallString that will point to the location of the program that will be run when you choose to uninstall the program through the Control Panel. That uninstall program is normally in the directory where the program's files have been placed. For some programs, you may see an InstallLocation key under an entry with a name matching the name of the relevant program that points to the directory where the program's files are located.

moonpoint
  • 5,268
  • 2
  • 21
  • 22
1

It is entirely up to the vendor of each application to provide an uninstaller. There is no universal standard place where the list of files/reg settings that need to be removed are stored. This is why so many programs leave a ton of their garbage all over the hard drive. Most programs simply do not clean up after themselves very well.

Most software vendors package their software in a 3rd party installer, the most common of which are InstallShield (Flexera Software) or Microsoft Windows Installer (.msi). These installer products allow software vendors to define tables that contain all the files and reg settings in the payload and where they go. They also provide a scripting language that vendors can use to make decisions during the install process.

These products make deploying applications easy for vendors without having to write their own installation routines, but the point is that it's still up to each vendor to actually use those features. Both Microsoft and InstallShield automatically generate a basic uninstall routine for you when you build a project, but it just removes the files and reg settings listed in the tables -- provided they haven't changed. They won't remove anything added after or any settings in the user directory, and they won't apply any intelligence to the uninstall by default. If anything is ambiguous, it gets left alone.

It is for this reason that uninstallers are so sloppy and why it's practically impossible to cleanly remove an application when that vendor was just too lazy to think about such things (or worse in the case of crapware, doesn't want you uninstalling their app).

Wes Sayeed
  • 14,102