cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gridman
Level 8

Patch Uninstall Failing

I have a Basic MSI project that I created my first release with. It works fine. Next, I created a minor upgrade where the application file and some other files are updated. This too works fine, and uninstalls perfectly.

Next, I created a standard patch from the minor upgrade project (used as the latest package) and the first installation project (used as the previous package). The patch installs on Vista just fine. The problem is when I try to uninstall the update.

I go to "Uninstall an update", click to uninstall it, it asks me, "Are you sure you want to uninstall this update". I answer Yes. Then it acts like it is going to perform the uninstall, but quits part way through and gives this error, "Fatal error during installation". Since the uninstall failed, there is no log file to look at. However, I have MSI logging turned on and it did generate log files on the first install. Just not in the case of the patch uninstall, because it didn't make it far enough along.

Any ideas?
Labels (1)
0 Kudos
(6) Replies
gridman
Level 8

This is a Standard User application. So the application is in a component where the key file is a registry entry under HKCU, which is the only way I know to pass validation on a standard user app.

So, for the minor upgrade, I updated the application, and when I built the release, I got a Val0004 error, because it said that the app had changed, but the component's key file had not. So, if I change the key from pointing to the registry entry and instead point it to the app file, it will build with no errors. Then, I can create the patch, install it, but I get the error mentioned in the previous post when I try to uninstall the patch.

I'm wondering if the problem is because I changed the key for the component, as it doesn't match the original. But if I don't change it, I get the Val0004 error. Strange.
0 Kudos
gridman
Level 8

Okay, I just read in the Help that for a minor upgrade, you can not change the key file of a component.

So, it looks to me if I left the component's key alone, and I could get around the Val0004 error, I wouldn't have this problem with the patch uninstall.
0 Kudos
gridman
Level 8

So far I haven't found a satisfactory way to get around this Val0004 error.

Does anyone have any ideas?
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

The VAL0004 error can be ignored in this case. When a registry entry is set as the keypath of a component, the component is always reinstalled during an upgrade/maintenance scenario (unless the Never Overwrite option was set on the component). VAL0004 does not take this into account.

As long as the files are updated in the component (i.e. they have higher version numbers) and they use the same file keys in the File table (this should be fine if the files are not included from a dynamic link), they should be upgraded during an upgrade/patch.

If the patch uninstall it still encountering an error, try launching the uninstall with the following command line to log it:
msiexec.exe /I C:\PathToMsi\MsiPackage.msi MSIPATCHREMOVE=C:\PathToPatch\PatchPackage.msp /l*v C:\patch_uninstall.log
0 Kudos
gridman
Level 8

Thanks for the help. I will try your suggestions and report back.
0 Kudos
gridman
Level 8

I followed your suggestion and ignored the Val0004 error. No problems installing the minor upgrade and no problems installing the patch when ignoring this error.

I have worked a bit with the msiexec.exe command but haven't got that figured out yet. I am testing these installs on several virtual machines that are configured with the different Windows versions.

What's interesting is that, on a virtual machine, if I use Update.exe to install the patch, I will have problems uninstalling it. If I don't use Update.exe, and just double click on the patch file directly, the patch will install, and uninstall on Vista with no problems. Not sure why that would be, but I will keep working with it and see what I can find out.

I will probably just test the patch install and uninstall on regular machines, and bypass the virtual machines, to see if it makes any difference.
0 Kudos