- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Uninstall Patch for Basic MSI Project
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
I have made a Quick Patch for a Basic MSI project.
Before the patch the product is correctly shown in 'Programs and Feature' with version as Major.Minor.Build.
After patching the product is correctly shown in 'Programs and Feature' with versionas Major.Minor.Build.Patch#.
How do I uninstall the patch? If I uninstall, it uninstalls the entire product.
Checking 'Allow Patch to be Uninstalled' didn't seem to matter.
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi,
The Windows Installer Engine can't read the 4th field of the Productversion.
Try leaving out the 4th field and incrementing the 3rd field - for example: xx.yy.02
Rebuild, re-apply the new patch to your package and then try to remove it again.
In addition take a look at the MSIPATCHREMOVE property which you can use in a command prompt.
https://docs.microsoft.com/en-us/windows/win32/msi/msipatchremove
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Not all patches can be uninstalled - uninstallation of a patch is not allowed if:
- You have packaged a Major Upgrade as a Patch
- If the patch adds a row certain windows installer tables. If it does patch validator (Val0015) will be shown. A full list of these tables can be found here: https://docs.revenera.com/installshield27helplib/helplibrary/Val0015.htm#updatingapplications_1015703954_1068608
- If the patch adds content to the RemoveFile or RemoveRegistry tables. If the patch is designed to remove a file or registry entry that was not included in the original installation package, uninstalling the patch will not restore that file or registry entry.
- If the patch contains SQL script support that was added through the SQL Scripts view, the SQL script will not run during the patch uninstallation.
Hope this helps,
Stuart
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Shunt, Thanks for your quick reply. I think my patch is able to be uninstalled.
Where would I find the Val0015 message?
When I install my base product the version is xx.yy.zz in 'Programs and Features'.
I install the Quick Patch with:
msiexec /p PatchPackage.msp REINSTALL=ALL REINSTALLMODE=ous
Then the version is xx.yy.zz.01 in 'Programs and Features'.
That seems correct... or should there be a separate line for the patch in 'Programs and Features'?
Then I uninstall the patch with:
msiexec /package {Product Code of Original Install Package} /uninstall {Revision number of .msp file}.
That uninstalls the entire patched and original package.
How do I uninstall just the patch?
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
I see this in the build window:
Performing Upgrading and Patching Validation
Val0003: This setup will perform a MINOR upgrade of the referenced previous setup
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi,
The Windows Installer Engine can't read the 4th field of the Productversion.
Try leaving out the 4th field and incrementing the 3rd field - for example: xx.yy.02
Rebuild, re-apply the new patch to your package and then try to remove it again.
In addition take a look at the MSIPATCHREMOVE property which you can use in a command prompt.
https://docs.microsoft.com/en-us/windows/win32/msi/msipatchremove
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Thanks Shunt.
That got me going. I did find that I am able to keep the 4th field... which is great! Major.Minor.Build.Patch.
I did find the link you posted to be a bit confusing and found this link to be better.
https://docs.microsoft.com/en-us/windows/win32/msi/uninstalling-patches
Thanks again.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Quick patch oddity when attempting to patch Dynamically Linked files.
Dynamically Linked files appear twice under 'Files', 'Original Setup Files'.
The file will only be patched if I add BOTH of them to 'Files To Patch'.
That works fine for installing the patch... but then the entire patch uninstall fails.
How to handle patching of Dynamically Linked files?
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dynamic File linking will create new components GUIDS and new Key files with each new build.
This breaks the upgrade rules and therefore produces the strange behaviour as we can't delete components/key files with patches/minor upgrades.
You will need to create a Major Upgrade, or try using the Patch Optimization "Previous Package" settings with a Minor Upgrade and then Patch Design.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi Shunt,
Thanks for that explanation. I will avoid using dynamic links for our next release.
Best Regards