Let's say I generate my WIX XML file with a Product Id of *. Also for each Component GUID I use a *.
<Product Id="*" Name="xxx" Language="1033" Version="1.0.0.0" Manufacturer="xxx" UpgradeCode="xxx">
Behind the scenes is the * spinning a unique GUID each time I compile my WIX Installer? Let's say I have version 1.0.0 installed a machine. Then I recompile my WIX Installer to version 1.0.1.
When I go to install 1.0.1 how does WIX know that 1.0.0 is already installed and thus will remove all files/registry entries and install 1.0.1?
Should I be using * from GUID or should I have a unique ID/GUID in my WIX XML configuration?
To generate GUIDs use the guidgen tool that ships with Visual Studio, generally located under Tools > Create GUID menu, or the GuidGen.com site. GUIDs generated this way will work fine in WiX, however since they are in mixed case they may cause issues if you share them with users of other, non-WiX tools.
To Generate a GUID in Windows 10 with PowerShell, Type or copy-paste the following command: [guid]::NewGuid() . This will produce a new GUID in the output. Alternatively, you can run the command '{'+[guid]::NewGuid(). ToString()+'}' to get a new GUID in the traditional Registry format.
The KeyPath for a Component is a single resource that the Windows Installer uses to determine if a Component "exists" on a machine.
Product/@Id="*"
randomly generates a new GUID, which is sufficient for product codes. Component/@Guid="*"
calculates a GUID that stays the same as long as your target path stays the same, which is necessary to comply with component rules.
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