0

I'm performing a minor upgrade but it's not updating files to one of my feature of an installer. It's giving following error in MSI log.

MSI (c) (88:64) [21:35:44:834]: Note: 1: 2262 2: Patch 3: -2147287038
MSI (c) (88:64) [21:35:44:834]: Machine policy value 'EnforceUpgradeComponentRules' is 0
MSI (c) (88:64) [21:35:44:834]: SELMGR: ComponentId '{A48DDBD3-3B28-F2FF-DBCE-0462EC330D7E}' is registered to feature 'Client', but is not present in the Component table. Removal of components from a feature is not supported!
MSI (c) (88:64) [21:35:44:834]: SELMGR: Removal of a component from a feature is not supported

I'm not deleting any component while making an upgrade installer. I have also checked for any component violation rules, but I didn't. I don't know why this happening. And because of that, feature 'Client' is going in Advertise state. I have also checked this component is not present in my MSI.

Ajit Medhekar
  • 1,018
  • 1
  • 10
  • 39
  • 3
    Any chance that the component isn't one you authored directly, but was added at build through other means (such as dynamic file links, etc.)? Look in the base package .msi for that component to identify what it is. – Michael Urman Jul 23 '17 at 12:51
  • 1
    Always look at the built msis not the ism to know whats really in it. – Christopher Painter Jul 24 '17 at 02:14
  • @MichaelUrman : No. We are not adding this at build time. – Ajit Medhekar Jul 24 '17 at 05:41
  • @ChristopherPainter: I compared previous version MSI & the latest MSI (that I'm going to upgrade), and found that the key file of that component has been deleted from dynamic location because of no longer use in newer release. But when I'm looking into ISM of older version i'm not finding that component, but in MSI of that version I can see it. Why so ? – Ajit Medhekar Jul 24 '17 at 05:41
  • I got the reason behind why that component I can see in MSI and not in ISM file. Because it's a dynamic file linking, and in that at the time of making a build it's creating a component for those files. – Ajit Medhekar Jul 24 '17 at 09:02
  • @ChristopherPainter But now the question is which changes do I need to make in my installer for deletion of dynamic file? for e.g, in my installer I'm dynamically link folder "XYZ" which contains subfolders & files. Now If externally I'm removing some sub-folders from "XYZ" for next version (minor upgrade) then what changes do I need to make in my installer ? – Ajit Medhekar Jul 24 '17 at 09:09
  • If you plan on removing a bunch of files and folders from the next release you need to switch to a major upgrade. – Christopher Painter Jul 24 '17 at 16:34

1 Answers1

1

Dynamic file/dependency scanning really isn't compatible with minor upgrades for this reason. Minor upgrades are very picky about their rules. If you really want to keep the dynamic consider switching to Major Upgardes. Either way, if you stick with minor upgrades always test your installers using the MSIENFORCEUPGRADECOMPONENTRULES=1 property setting.

As for your current situation, create a 0 byte file in your build environment of the same name and author it into the ISM exactly like you saw it in the build environment. Say component primary key, file primary key, component ID (guid) same feature ... everything. Now mark the component as transitive (I think it's called reevaluate in InstallShield.. sorry it's been awhile ) and give it a conditional expression that will always evaluate to false such as GoAway=1.

Now you'll pass minor upgrades rules and the component will be "punctured" and go away.

But I hope you can see this is only a patch. This situation can easily happen again using your current strategy. I highly suggest changing that.

Here's an article I wrote about 10 years ago that applies here:

http://blog.iswix.com/2007/06/dealing-with-very-large-number-of-files.html

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100