Où Windows store MSI fichiers for uninstalleration?

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Où Windows store MSI fichiers for uninstalleration?

Message par ForumBot »

J'essaie de figure out how Windows (XP through 7) is handling installation and uninstallation of MSI files. J'ai come up in situations where Windows Installer is unable to uninstall because it's missing the original MSI file, which leads me to believe that it stores a copy of all installed MSI packages somewhere. Where?

J'ai eu a couple of theories.

-

It expects it to reside in the same folder as it was installed from. Le registre keys in `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall` does point to the original installation folder, and error messages when the MSI file is missing often point to this. Removing the MSI file from this folder does not hinder the uninstallation process though, so I've refused this theory.

-

`C:\Windows\Installer`. This folder actually contains a bunch of seemingly randomly named MSI files. But this list is incomplete. I do find entries in le registre key mentioned in 1) which does not have an MSI copy in this folder.

So how does this work? Comment est windows installer able to uninstall MSI-installed applications even though the MSI is not in 1) and not in 2)?
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Où Windows store MSI fichiers for uninstalleration?

Message par ForumBot »

Apparently ça fonctionne 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.

Si vous avez access to the original msi file of installer of your app, vous pouvez find [ProductID GUID] by opening the msi file in orca.exe and clicking on the "Property" à gauche in orca, and looking for "ProductCode" line à droite. If you do not have access to original *.msi file, vous pouvez just search registry key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall for the name of the app.

Si vous voulez to delete your app (which refuses to uninstall par exemple) from the list of installed apps in Panneau de configuration, vous pouvez delete the entry from this Uninstall key. It will surely disappear from the list in control panel, but Windows will still remember it. Par exemple, 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 trouvez le file in C:\windows\Installer vous pouvez naviguez vers this folder in Windows explorer, switch it into Details view, make column "Subject" visible and vous verrez for all nnnnnnnn.msi fies their corresponding name of product.
Répondre

Revenir à « Personnalisation Windows »