My scenario is this: I want the installer to completely remove the old version (all files except those created by the application during its lifetime) and replace it with the new version.
In my Wix script I use auto-generated GUID (asterisk) for Product ID and Package ID, while I use my own GUID for UpgradeCode which always stays same. What I'm not sure if I can safely use auto-generated GUID (asterisk) for Component tags as well, with respect to my scenario?
So far I was using NSIS. I wanted to try Wix but got a little doubt since people on forums say it will take you about 30 days to learn it while one can start off with NSIS in 1-2 days. However, for a standard installation that typical users need, it took me 2 days to get a really good installer package using Wix. If you have a little background in xml you should probably have no worries. Thanks to Rob and all the other contributors for creating the Wix!
Yes, the auto-guid Component/@Guid
are safe. They are done very specially to ensure that the GUID is generated in a way that is stable across releases for that Component such that the Component Rules are not violated.
Additionally, if you do not share Components with other Products and you always use major upgrades and you schedule the major upgrade early, then you don't have to worry about Component GUIDs much at all, because the two Component GUID definitions will never be on the machine at the same time. For example, the defaults for the MajorUpgrade
element give you exactly this:
<MajorUpgrade DowngradeErrorMessage='A newer version of [ProductName] is installed.' />
So, the answer is, "Yes". :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With