- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Remove Folder and its files while patch
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Remove Folder and its files while patch
Hi team,
We have requirement to remove the folder and its files while doing patch installation(only build number differs) . The new files are added and the file with same name are updated/installed successfully. But in our case, we have removed a component from feature(as it don't wanted to be installed going forward). So if user do minor upgrade, the component need to be removed as well from installation location.
Any suggestion to achieve this behaviour is appreciated.
Note : If we have feasibility to uninstall and install the product again on patch(without changing product code and only on incremental build number - minor upgrade), that would be best option.
Thanks
A patch (or Minor upgrade) does not support the removal of a component.
To remove a component during an update you will need to change the ProductCode of your installer, which then leans into the realm of Major Upgrades.
https://learn.microsoft.com/en-us/windows/win32/msi/changing-the-product-code
"The product code must be changed if any of the following are true for the update:
....A component is removed from an existing feature."
We also have a great page in the Installshield helpnet which shows what can and cannot be achieved in the different Upgrade approaches:
https://docs.revenera.com/installshield/helplibrary/MajorMinorSmall.htm#updatingapplications_3928869889_1021412
Your immediate idea, maybe to change the product code and create a Major Upgrade Patch, however this is not a recommended approach by Microsoft:
https://learn.microsoft.com/en-us/windows/win32/msi/applying-major-upgrades-by-patching-the-local-installation-of-the-product
In summary: If you want to remove a component from your installer during an update then the best practice is to create and deploy a Major Upgrade.
Hi Shunt,
Thanks for your reply. I have tried changing product code for minor upgrade(only 4th digit changed). It is behaving like patch installation(folders not removed) if patch is enabled or installs as new software if patch is not enabled.
Actuall use case is , we need to do complete uninstall and install the software at minor upgrade. Do we have feasibilty to achieve this behaviour ?
Thanks in advance.