Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uninstalling a particular feature using msiexec

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 !!!

like image 411
Vishnu Avatar asked Apr 20 '12 22:04

Vishnu


1 Answers

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.

like image 126
Christopher Painter Avatar answered Sep 21 '22 12:09

Christopher Painter