cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
agshah
Level 7

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.

Labels (1)
0 Kudos

(4) Replies
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

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."

0 Kudos

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.

0 Kudos

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.

0 Kudos
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

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.

0 Kudos