Uninstalling a particular feature using msiexec

2019-04-25 09:38发布

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条回答
Luminary・发光体
2楼-- · 2019-04-25 10:19

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.

查看更多
登录 后发表回答