4

I am in the process of attepting to build an Microsoft installer update (MSP) where I would like to have the update installer remove files from the original installation.

I have succceessfully created a new msi, which when viewed in Orca.exe, I can see the RemoveFile table has the correct entry included, but after generating the *.msp file and executing, the files requested for removal still remain...

If anyone can help, it would be much appreciated.

pnuts
  • 58,317
  • 11
  • 87
  • 139
user778444
  • 87
  • 3
  • 8

2 Answers2

2

The MSI Component rules inhibit you from deleting Components during a Minor Upgrade or Small Update. However Phil Wilson's answer to this question here provides a novel solution to that: Add decimal 64 to the to-be-deleted files' Component's "Attributes" entry in the Component table. The flag he references, msidbComponentAttributesTransitive, is documented in the Component table documentation here.

user3454591
  • 331
  • 3
  • 5
0

File removals are associated with a component install or uninstall. So if your associated component is not being installed by the patch, the removal is not performed.

An easier approach is to use a custom action:

  • write a custom action which removes your file
  • add it in your new MSI
  • set this condition for it:

    PATCH

Cosmin
  • 21,216
  • 5
  • 45
  • 60