Actual problem: First time when we install the products, we can see 3 programs in control panel, 1 master(A) and 2 chained (B,C). Lets say, we now update B to a new version. This version update has assigned a new ProductCode to B. But the new product code is not updated in the master(A) which breaks the chained package hierarchy. Since master(A) does not have new ProductCode in its IsChainedPackage table, it is unable to uninstall C & B while uninstalling A.
I am trying to fetch value from registry and assign it to one of the column in "IsChainPackage" table of MSI.
I have found out that I can create custom action and assign value to public property. But I am unable to find how to use this property in ProductCode column of IsChainPackage table. I am looking for a solution where I can update the ProductCode field under Media->Releases->Pckg1/Pckg2 rows, with value that is present in registry. Is it possible?
Alternatively, Can I uninstall a different product (say B) using ProductCode, when an uninstall starts for a product (say A)? I mean, when we click uninstall A, first I want to uninstall B, then A. Can I do it with some custom action? If yes, what would be the settings I need to do in that custom action?