Reputation: 115
I'm building a couple of installers for our internal PowerShell modules. We're installing all the modules into the same folder structure. I have to update the PSModulePath
environment variable. Do I reuse the same GUID for the component between installers since its the same component or does it need to be unique per installer?
Upvotes: 1
Views: 1279
Reputation: 2621
Firstly, I would go with what @Christopher suggested, but to answer your specific question, I would say that WIX wants you to continue to use to continue to use the same GUID for each specific file.
From http://wix.sourceforge.net/manual-wix3/generate_guids.htm (emphasis mine):
For the Component element the generated GUID is based on the install directory and filename of the KeyPath for the component. This GUID will stay consistent from build-to-build provided the directory and filename of the KeyPath do not change.
So, if a file has the same directory and filename, then WIX will continue to assign it the same GUID, which they wouldn't do if they wanted the same file to have a different GUID each installer.
Upvotes: 0
Reputation: 55571
I'd author that component as shared and put it into a fragment file. Then in your various installers use a ComponentRef to pull it into your feature.
This way the last installer uninstalled will remove that component.
Upvotes: 2