Hello Zsolt,
Yes, your understanding is correct regarding the uninstall part.
If you use a major upgrade configured to uninstall the old version first, the old product will be uninstalled during the upgrade. This means the old feature’s resources should be removed by the old package, and the old feature’s uninstall custom action should also run from the old package, as long as it is correctly conditioned for uninstall.
Regarding the main question, how to install the new feature only if the old feature was installed, the recommended approach is to detect the old feature before the old product is removed, store the result in a public property, and use that property to condition the new feature.
You need to identify something that exists only when the old feature is installed:
- a registry value,
- a file,
- a folder,
- or another reliable marker created by that old feature.
In the new project, create a search for that resource, for example:
OLD_FEATURE_INSTALLED
Then, use this property to condition the new feature from the Organization page.
Hope this helps!
Best regards,
Liviu
FOLLOW US
Get the latest news in Application Packaging