首页 > 代码库 > Where does Windows store MSI files for uninstallation?
Where does Windows store MSI files for uninstallation?
Original link:
Where does Windows store MSI files for uninstallation?
Following content are only used for knowledge sharing. Please reprint from the original link. ^^
Apparently it works like this (On Windows 7, I do not know about XP and other OSes):
When a user installs some app, Windows does the following:
1) Creates a registry key
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\[ProductId GUID]
for this app.
If you have access to the original msi file of installer of your app, you can find [ProductID GUID] by opening the msi file in orca.exe and clicking on the "Property" on the left in orca, and looking for "ProductCode" line on the right. If you do not have access to original *.msi file, you can just search registry key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall for the name of the app.
If you want to delete your app (which refuses to uninstall for example) from the list of installed apps in Control Panel, you can delete the entry from this Uninstall key. It will surely disappear from the list in control panel, but Windows will still remember it. For example, if you try to install a next version of the same app, Installer may still insist on uninstalling the previous version. See item 2 for that.
2) Windows copies the original *.msi file into the folder C:\Windows\Installer and renames it to a random name (keeps .msi extension though). Windows also creates a key in registry in
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\[InternalUserId]\Products\[some random guid-like sequence of chars identifying to windows your installation]\InstallProperties.
ValueName "LocalPackage" in this reg key will point to the renamed msi file. To find the file in C:\windows\Installer you can navigate to this folder in Windows explorer, switch it into Details view, make column "Subject" visible and you will see for all nnnnnnnn.msi fies their corresponding name of product.
Where does Windows store MSI files for uninstallation?