1
votes

I'm new to WIX and MSI, so first i try to get bit of theoretical background and yet iam getting confused about this scenario - not sure how installer service will react if...

I got 2 .msi install packages of same application(but different version - and are supposed to be installed separately - i mean they can be installed at one machine without overwriting old one), both include component with same GUID - but has different location for installation(user can choose install path) - Question is how will windows installer react when installing second package - how WI changes refcount of component(there is one component with one GUID - but 2 physical resources - files) - i suppose in registry there should be COM GUID for component - but if files are splitted in several places, then how it can be effectively removed, because refcount is going to be still 1 so if i install both packages and try to remove first one then - this component will still get's unistall because of that count, am i right?

So to avoid this situation and get full uninstall, i would need change component GUID for every new installation package - using '*', so the Windows Installer will count component in sepate way for each component?

Petr

1

1 Answers

3
votes

Windows Installer keeps meta about installed products in the registry under HKCR\Installer and caches the .MSI in C:\Windows\Installer. For correct behavior you have to follow the "component rules".

WiX will generate unique yet stable GUIDs for you in most situations when you use "*". If your goal is to have v1 and v2 of the same product installed side by side (think Visual Studio) then you should change your directory structure with each release ( [ProgramFilesFolder]\Company\Application X [ProgramFilesFolder]\Company\Application Y ) and assign a new UpgradeCode GUID. You can leave the Component GUID as * since WiX will realize the directory path is different and generate new unique yet stable GUIDS for the new path.

If you are using static generated guids instead, yes, the guids would all need to be updated because they files no longer represent the same components.