Uninstalling a particular feature using msiexec

旧城冷巷雨未停 提交于 2019-12-22 04:48:13

问题


I installed an test application which has two features (FirstFeature & SecondFeature). I want to remove only one feature (SecondFeature) from the application. I tried using REMOVE property in command line. Here is the command used to remove SecondFeature.

msiexec /x RemoveFeatures.msi REMOVE="SecondFeature" /L*V log.LOG

But it is uninstalling the complete application. Log file shows that REMOVE=ALL is added by default. Here is the log file details.

MSI (s) (24:B4) [17:39:05:231]: Command Line: REMOVE=SecondFeature REMOVE=ALL

MSI (s) (24:B4) [17:39:05:231]: PROPERTY CHANGE: Adding REMOVE property. Its value is 'SecondFeature'.

MSI (s) (24:B4) [17:39:05:231]: PROPERTY CHANGE: Modifying REMOVE property. Its current value is 'SecondFeature'. Its new value: 'ALL'.

It indicates REMOVE property value is overridden during uninstall process. Do I need to set any other property to remove a specific feature ?

Any help is appreciated. Thanks in advance !!!


回答1:


As you noted, /x is for uninstall. A complete (ALL) uninstall.

Although it may be counter intuitive you want to do an install that removes a feature.

msiexec /i RemoveFeatures.msi REMOVE="SecondFeature" /L*V log.LOG

You may also wish to add /qb or /qn to make it non-interactive / silent.



来源:https://stackoverflow.com/questions/10254500/uninstalling-a-particular-feature-using-msiexec

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!