Patch behavior inconsistent with full installer behavior
Posted: Tue Feb 13, 2007 12:43 pm
I've built a 1.0.1 patch against my 1.0.0 Web .EXE installer, and I'm noticing some inconsistencies in how it behaves as compared to the full installer.
My installers write the current install version to the registry at HKLM/Software/My Company, and then check that location when the installer is run to be sure we aren't trying to overwrite a newer version - protecting the user from himself, and ensuring that all users will be using the most current version.
So, this causes 2 problems. Firstly, if I run the patch to upgrade to 1.0.1, it properly updates the version number stored in the registry. However, on uninstall, this registry value is not removed. It is properly removed when uninstalling a 1.0.1 or a 1.0.0 that was installed using the full installer. Any idea why the patch isn't taking care of this?
Also, in a related point, I have script in there to check this registry entry and terminate the installer if the version stored in the registry is greater than the installer's version number. So, it seems that when I use the patch to upgrade 1.0.0 to 1.0.1, and then uninstall, this logic hasn't been updated, so the installer terminates (seeing 1.0.1 in the registry, but comparing against 1.0.0, when it should be comparing against 1.0.1). Do patches update installer logic? Or do they just do a one time restructuring of the install directories? I hope I've explained this well enough to be understood.
Finally, I've noticed that if I run the 1.0.1 patch after installing 1.0.1 with the 1.0.1 full installer, it errors, saying that it cannot find an installed program to update. But if I run the 1.0.1 patch after upgrading a 1.0.0 install with that same 1.0.1 patch, it doesn't give that same error. Shouldn't these two cases behave the same? I would expect that a 1.0.1 install should always behave the same, regardless of whether it is the product of a full 1.0.1 install, or a patch from 1.0.0 to 1.0.1. Any thoughts on this?
Thanks,
Peenesh Shah
My installers write the current install version to the registry at HKLM/Software/My Company, and then check that location when the installer is run to be sure we aren't trying to overwrite a newer version - protecting the user from himself, and ensuring that all users will be using the most current version.
So, this causes 2 problems. Firstly, if I run the patch to upgrade to 1.0.1, it properly updates the version number stored in the registry. However, on uninstall, this registry value is not removed. It is properly removed when uninstalling a 1.0.1 or a 1.0.0 that was installed using the full installer. Any idea why the patch isn't taking care of this?
Also, in a related point, I have script in there to check this registry entry and terminate the installer if the version stored in the registry is greater than the installer's version number. So, it seems that when I use the patch to upgrade 1.0.0 to 1.0.1, and then uninstall, this logic hasn't been updated, so the installer terminates (seeing 1.0.1 in the registry, but comparing against 1.0.0, when it should be comparing against 1.0.1). Do patches update installer logic? Or do they just do a one time restructuring of the install directories? I hope I've explained this well enough to be understood.
Finally, I've noticed that if I run the 1.0.1 patch after installing 1.0.1 with the 1.0.1 full installer, it errors, saying that it cannot find an installed program to update. But if I run the 1.0.1 patch after upgrading a 1.0.0 install with that same 1.0.1 patch, it doesn't give that same error. Shouldn't these two cases behave the same? I would expect that a 1.0.1 install should always behave the same, regardless of whether it is the product of a full 1.0.1 install, or a patch from 1.0.0 to 1.0.1. Any thoughts on this?
Thanks,
Peenesh Shah