Reputation: 90475
I have to replace it because of a bug that blocks the software uninstallation, but Windows can't find the MSI file if I use the file search utility, but I think the MSI is stored somewhere where the Add or Remove Programs
utility can use it.
Upvotes: 19
Views: 66888
Reputation: 75
One more way:
Upvotes: 0
Reputation: 21
The MSI files do get renamed. They are found in %windir%\installer. I know that has been answered, but I wanted to include a script to help find them with the application name.
Here is a pwsh script to resolve the renamed MSI to the application display name.
$loc = Get-ChildItem -Recurse HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\
$loc | ForEach-Object { Get-ItemProperty $_.PsPath } | Where LocalPackage -ne $null | Sort DisplayName | Select DisplayName,LocalPackage
Upvotes: 2
Reputation: 25887
InstallShield creates a copy of all Microsoft Installer (MSI) files at %windir%\installer\ path. Here %windir% is an environment variable which points to the location of Windows installation directory. Typically it is C:\Windows. Before creating a copy of any MSI file it renames it using some random nomenclature e.g. I can see a file named 65ec5c99.msi in C:\Windows\Installer directory on my machine.
Now there are two ways to figure out the actual product name for the renamed MSI file:
Check LocalPackage attribute inside registry at below path:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\<InternalUserId>\Products\<ProductGUID>\InstallProperties
InternalUserId in above registry path is a string like S-1-5-18
. Similarly, ProductGUID is a GUID string like 00058CD18F0BF523DA1072073D56715D
. This GUID is embedded inside the MSI file itself as a public property. You can get the value of this public property by opening the MSI file using any utility or tool like Orca
Open C:\Windows\Installer folder in explorer. Change the view of the directory to Details view (Refer screenshot):
Add Subject column to the view. Now product name of every MSI in that folder will be visible under Subject column (Refer screenshot):
Note: The C:\Windows\installer path mentioned in point # 2 above is a hidden directory. So it is not visible in explorer by default. To make it visible, go to View tab in explorer > Click on Options dropdown button > Click on Change folder and search options (Refer screenshot):
This will open Folder Options dialog box (Refer screenshot) > Click on View tab > Now make below changes:
Upvotes: 22
Reputation: 32936
Does it not go into %windir%\installer\
?
Though I think that the files may get renamed. Not sure where you get the name mapping from...
This directory gets very big so I move it to an external drive. This sometimes cause uninstalls or updates to fail with a missing msi error, but this can be fixed by putting the directory back.
Upvotes: 19
Reputation: 61
To see useful names of msi files in C:\Windows\Installer
right click at the top of explorer and add the field to view Subject (will probably have to select more as it isn't a default like name, date modified, etc.) From here you can find the msi and use it to uninstall programs.
Upvotes: 6
Reputation: 1182
When you install a package using the Windows Installer service, the msi file does get cached in the hidden folder "%windir%\installer". It does get renamed, and the new name is a hex string that doesn't have an obvious correlation to the original name. Something like "123ab4.msi".
It's not hard to figure out which one is the cached copy of your app. The quickest way is to look for the cached file that's the same size. When you think you've found it, hover your pointer over the file's name in Windows Explorer. The tooltip will come up, and it will show you the data from the summary information stream of the package. Product name, author name, and so on. Once you've found the right file, you can directly edit it with a tool like Orca.
If you're just trying to fix things on your own machine, then directly editing the cached database may be a good option. However, Microsoft does provide a built-in way to handle a problem like this. You can create a patch (an msp file), which contains the difference between the original msi file and your updated msi file. That patch could then be distributed to anyone else that has already installed your app using the original install, and it would be easy to use.
MSDN discusses patch creation here - http://msdn.microsoft.com/en-us/library/aa368060%28VS.85%29.aspx
Deleting the hidden folder generally isn't a good idea, as that breaks some core functionality of the Installer service. That includes patching, detect and repair, and the ability to upgrade via migration rather than uninstalling and reinstalling.
Upvotes: 5
Reputation: 22406
You can force a recache/reinstall using with MSIEXEC, the recommended way to update buggy installation packages that cannot be otherwise removed is to recache with a fixed package, then uninstall as usual.
MSIEXEC /fv setup.msi
Upvotes: 9
Reputation: 120937
Maybe the msi has simply been deleted. You can delete the installation folder and run the msi cleanup utility and then reinstall your program.
Upvotes: -1