views:

107

answers:

4

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.

A: 

Maybe the msi has simply been deleted. You can delete the installation folder and run the msi cleanup utility and then reinstall your program.

klausbyskov
edited the question to clarify
Jader Dias
MSIZAP (Windows Installer Cleanup) is a very dangerous tool. See http://robmensching.com/blog/posts/2009/3/6/More-on-Haacks-Troubleshooting-Windows-MSI-Installers for more information
sascha
+2  A: 

does it not go into %windows%\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

Sam Holder
excelent! I'm sure now that the file gets renamed, but you can find the new name in the Windows Registry
Jader Dias
ahh glad you know how to get the mapping
Sam Holder
+1  A: 

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
sascha
+1  A: 

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.

Ed