Wix Toolset - Cannot create/install patch with fewer files/components than the original msi package

449 Views Asked by At

I have few locations on the field for which the initial .msi is same having about 2000 files (of multiple file types). However, I will have to send patches to few of the locations depending on the need so the patch should consist of fewer files (sometimes only 1 file as a fix). I am unable to create a patch (.msp) with just one single file or few files that I want to add/update but have to include all the original set of files as well. Can this be accomplished by any means? Please help !!

Also I do not want to do Major Upgrade as some of the original files are logs and database file which needs to stay intact and cannot be removed.

When I tried this scenario with simple text files where my .msi has 3 text files and the .msp has only 1 text file that I want to update, everything went successful and I could see the changes. But when I tried with my actual folder, I got this error:-

MSI (s) (A0:70) [16:17:59:147]: SELMGR: ComponentId '{B826B564-A3C4-45AB-9623-FB0089831140}' is registered to feature 'ProductFeature', but is not present in the Component table. Removal of components from a feature is not supported! MSI (s) (A0:70) [16:17:59:147]: SELMGR: Removal of a component from a feature is not supported

where the component it is referring to is a dll. Am I missing something when it comes to dlls ?

3

There are 3 best solutions below

0
Sarma On BEST ANSWER

Thank you David & Chris and all others for your time on this. For now, I have added new components as a new feature so that all existing components can belong to same feature. This has removed the error for me.

4
Doc On

Trying to completely understand what your requiring but it seems like you're trying to remove a component as part of what's called a minor upgrade. What you'll want to do instead of removing the component is just keep the component but instead remove the file attribute from that component. Essentially creating an empty component until you can next do a major upgrade.

0
Christopher Painter On

The only way to remove a file in a patch is to "puncture" the component. You do this by marking the component's Transitive transitive as true and putting a condition on the component that always evaluates to false. You must still keep the component and file in the MSI/MSP but you can provide a zero byte file.

When the minor upgrade / patch is applied the component will reevaluate and uninstall itself since the condition is false.

Whenever you do your next major upgrade you can remove the component entirely.