Simple Solution: Changed installation path requires changed component GUIDs due to MSI component rules - so change both together, or confusion results. Technical details below.
If changing component GUIDs is not an option (it should be), you should be able to "fix" your current problem by scheduling RemoveExistingProducts
early in the InstallExecuteSequence
(general approach to avoid problems caused by MSI-file design problems and component reference errors). Or rather, you will avoid the problem seen, the actual underlying cause is likely still there, it is just avoided.
I suppose there could also be problems in the Directory table that causes this (unlikely when using WiX).
Explanation: The central thing to understand with MSI componentization is that absolute paths are reference counted, and not files per-se: Change my component GUID in wix? In other words: the component GUID does not follow a file around if it moves
.
The overall concept of MSI is that there is a 1:1 mapping between a component GUID (unique identifier) and an absolute path (install location / key path). The full path, including file name if any.
Accordingly, renaming a folder means you should generate new GUIDs for all components targeting that folder (since the absolute path has changed). Somewhat hard to understand and rationalize, but that is the design.
WiX features auto-magic for automatically setting the component GUIDs dealing with changes like folder renames and re-targeting in an automagic-fashion (recommended read). A component GUID is calculated based on installation folder (absolute path).