Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

windows installer - Remove file during minor upgrade

I have one feature with several components. One components contains dynamic linked files in a directory. When I delete one file in that directory, build the setup, and run the upgrade, no file will be replaced. In the log I found this error:

MSI (s) (5C:D8) [12:28:41:180]: SELMGR: ComponentId '{8F4E8185-5B89-9FC9-9FD5-3200102A0265}' is registered to feature 'MyFeatureName', but is not present in the Component table.  Removal of components from a feature is not supported!
MSI (s) (5C:D8) [12:28:41:180]: SELMGR: Removal of a component from a feature is not supported

How can I remove a dynamic linked file?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The book answer is use a major upgrade.

The ultimate MSI hacker's answer is to edit the previous MSI in ORCA to get the exact primary key and GUID values. Author that component statically into your latest ISM and then implement the "puncture component" pattern. This means you set the Revaluate attribute and then give it a condition that always evaluates to false. In this way the new MSI still has the component but it gets removed from the machine.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...