- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to share files between Features in InstallShield MSI InstallScript project?
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
How to share files between Features in InstallShield MSI InstallScript project?
Forlks,
How to share files between Features in InstallShield MSI InstallScript project?
I have some common files that I want in Feature A and B.
I added them to both features. But when I uninstall these common files are not getting removed.
What is the recommended way to share files between features.
thanks in advance.
Are the common files installing to the same directory? If so this would break Component Rules - https://learn.microsoft.com/en-us/windows/win32/msi/what-happens-if-the-component-rules-are-broken
"If two components have a resource under the same name and location and both components are installed into the same folder, then the removal of either component removes the common resource, which damages the remaining component."
Hi,
Yes, the common files are installed at the same directory. Thanks for the link.
So any idea how to go about this? Appreciate any recommendations.
Hi,
I was able to take below approach and seems to work. Would you please advise if this is acceptable?
Instead of including the common files (that have same name and location) in Feature A and B, I created a Feature C which includes these files. Feature C is not visible to the user but is a required Feature for Feature A and B. This seems to work, common files are getting installed and removed appropriately.
Appreciate your input.
Perfect solution - and one that I would have suggested.
If further down the line things become more complex and more features are introduced which are optional and don't require the shared files - you can look into creating conditions for the Feature C to only install if specific other features are selected.