I think I see what is going on. A level of "0" disables the feature. A condition could be used to change the level, but conditions are NOT evaluated when the ADDLOCAL (or any one of several other) property is set. As a result, the ADDLOCAL is unable to enable that feature.
You need to change the level to some positive (non-zero) integer. You can then use a condition on that feature to not install the add-on in your initial transaction if the required framework was not initially installed. MsiConfigureFeature will then be able to install the feature. -----Original Message----- From: Jan Bilek [mailto:bil...@gmail.com] Sent: Saturday, January 23, 2010 8:17 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] How to uninstall other products during uninstallation After i execute function MsiConfigureFeature("PRODUCT-GUID", "addOnTool", INSTALLSTATE_LOCAL); i've found following lines in log related to addOnTool: Command Line: ADDLOCAL=addOnTool CURRENTDIRECTORY=... ... PROPERTY CHANGE: Adding ADDLOCAL property. Its value is 'addOnTool'. ... Feature: addOnTool; Installed: Absent; Request: Null; Action: Null ... In final Property list i've found following interesting lines: Property(S): ProductState = 5 Property(S): ProductToBeRegistered = 1 Property(S): ADDLOCAL = StatsPlg Property(S): ACTION = INSTALL Property(S): INSTALLLEVEL = 1 Does it make any sense? Is there anything else i should look for? IMHO does MsiConfigureFeature nothing. It just adds ADDLOCAL property, but with no further effects. MSI installs mainApp product (level 1) and leaves addOnTool untouched (level 0). Jan Blair wrote: > Turn on verbose logging via the installer logging policy. What are the > values of the feature-related properties? What happens to feature/component > states? > > -----Original Message----- > From: Jan Bilek [mailto:bil...@gmail.com] > Sent: Friday, January 22, 2010 2:47 AM > To: General discussion for Windows Installer XML toolset. > Subject: Re: [WiX-users] How to uninstall other products during > uninstallation > > Huge thanks... this definitely seems to be a solution, but when i try > use it, i find following problem: > > I've 2 features in my wix project: > > <feature id="mainApp" level="1" ...> ... </feature> > <feature id="addOnTool" level="0" ...> ... </feature> > > "addOnTool" does not get installed during the installation when > conditions are not met. I use following line to install it from main > application: > > MsiConfigureFeature("PRODUCT-GUID", "addOnTool", INSTALLSTATE_LOCAL); > > It should install the missing feature, but all it does is to run the > whole installation again. But, surprisingly, it does not install > "addOnTool" feature. I tried to use different installation state > parameters, but with no success. > > Do you have an idea, where could be a problem? > > Regards, > Jan > > > > > > > Blair wrote: > >> If you run that API from your main app, the entire installation >> > transaction > >> will run, but only the indicated feature (and whatever components that >> > were > >> not previously installed that are part of that feature) will be "selected" >> for installation, meaning that only those files/registry entries/etc. will >> actually be installed. The main app's components, since they were already >> installed, won't be reinstalled. >> >> If any custom actions you have in that MSI are tied to component or >> > feature > >> states, they will be included/skipped as appropriate. If other conditions >> control them, then what happens depends on those conditions. >> >> That API effectively runs the transaction engine with the ADDLOCAL >> > property > >> set to the indicated feature when the feature is not already installed. >> >> -----Original Message----- >> From: Jan Bilek [mailto:bil...@gmail.com] >> Sent: Thursday, January 21, 2010 9:20 AM >> To: General discussion for Windows Installer XML toolset. >> Subject: Re: [WiX-users] How to uninstall other products during >> uninstallation >> >> But what will happen when main app detects that .net conditions are met? >> How will it install only the add-on tool? Is there any possibility to >> install certain product features (not the main app again) when main >> installation file was deleted? >> >> Thanks for reply. >> >> Jan >> >> >> Blair wrote: >> >> >>> My reference to the API MsiConfigureFeature() was intended to have it >>> >>> >> called >> >> >>> by the main application whenever it detects that the add-on isn't >>> >>> >> installed >> >> >>> but the framework is. End users don't have to do a thing (except run the >>> main application). >>> >>> -----Original Message----- >>> From: Jan Bilek [mailto:bil...@gmail.com] >>> Sent: Wednesday, January 20, 2010 12:34 PM >>> To: General discussion for Windows Installer XML toolset. >>> Subject: Re: [WiX-users] How to uninstall other products during >>> uninstallation >>> >>> Good idea, but what if user decides to install the add-on later (after >>> he updates his OS)? Wouldn't he have to reinstall main application? This >>> solution is my last resort. It will work, but it seems to be too >>> complicated (for me and users aswell). >>> Isn't there any other easier way? >>> >>> Thanks. >>> >>> Jan >>> >>> >>> Blair wrote: >>> >>> >>> >>>> Put both into the same MSI, but under different features. >>>> >>>> >From your main application, add the "add-on" feature when .net 3.5 is >>>> discovered. MsiConfigureFeature() would possibly be a good candidate. >>>> >>>> -----Original Message----- >>>> From: Jan Bilek [mailto:bil...@gmail.com] >>>> Sent: Wednesday, January 20, 2010 7:12 AM >>>> To: General discussion for Windows Installer XML toolset. >>>> Subject: [WiX-users] How to uninstall other products during >>>> >>>> >> uninstallation >> >> >>>> Hello, >>>> I've got following problem... >>>> >>>> I have got a main application and an add-on tool. The add-on can be >>>> installed only if .net framework 3.5 is installed and main application >>>> must be able to install the add-on when user updates his system to .net >>>> >>>> >>>> >>> 3.5. >>> >>> >>> >>>> My current solution consists of two independent wix/msi packages which >>>> are executed from custom bootstrapper application. This setup works fine >>>> > > >>>> during installation process, but it has major flaw when it comes to >>>> uninstallation. I need to uninstall add-on during the uninstallation of >>>> main application, but since these two parts are independent, they have >>>> to be uninstalled independently. >>>> >>>> Is there any way how start or schedule one uninstallation (add-on) >>>> during the other (main app)? >>>> >>>> Thank for any help. >>>> >>>> Best regards, >>>> Jan >>>> >>>> >>>> >>>> >>>> > ---------------------------------------------------------------------------- > >> >> >>> >>> >>> >>>> -- >>>> Throughout its 18-year history, RSA Conference consistently attracts the >>>> world's best and brightest in the field, creating opportunities for >>>> Conference >>>> attendees to learn about information security's most important issues >>>> through >>>> interactions with peers, luminaries and emerging and established >>>> >>>> >>>> >>> companies. >>> >>> >>> >>>> http://p.sf.net/sfu/rsaconf-dev2dev >>>> _______________________________________________ >>>> WiX-users mailing list >>>> WiX-users@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/wix-users >>>> >>>> >>>> >>>> >>>> >>>> > ---------------------------------------------------------------------------- > >> >> >>> -- >>> >>> >>> >>>> Throughout its 18-year history, RSA Conference consistently attracts the >>>> world's best and brightest in the field, creating opportunities for >>>> >>>> >>>> >>> Conference >>> >>> >>> >>>> attendees to learn about information security's most important issues >>>> >>>> >>>> >>> through >>> >>> >>> >>>> interactions with peers, luminaries and emerging and established >>>> >>>> >>>> >>> companies. >>> >>> >>> >>>> http://p.sf.net/sfu/rsaconf-dev2dev >>>> _______________________________________________ >>>> WiX-users mailing list >>>> WiX-users@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/wix-users >>>> >>>> >>>> >>>> >>> >>> > ---------------------------------------------------------------------------- > >> >> >>> -- >>> Throughout its 18-year history, RSA Conference consistently attracts the >>> world's best and brightest in the field, creating opportunities for >>> Conference >>> attendees to learn about information security's most important issues >>> through >>> interactions with peers, luminaries and emerging and established >>> >>> >> companies. >> >> >>> http://p.sf.net/sfu/rsaconf-dev2dev >>> _______________________________________________ >>> WiX-users mailing list >>> WiX-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/wix-users >>> >>> >>> >>> >>> > ---------------------------------------------------------------------------- > >> -- >> >> >>> Throughout its 18-year history, RSA Conference consistently attracts the >>> world's best and brightest in the field, creating opportunities for >>> >>> >> Conference >> >> >>> attendees to learn about information security's most important issues >>> >>> >> through >> >> >>> interactions with peers, luminaries and emerging and established >>> >>> >> companies. >> >> >>> http://p.sf.net/sfu/rsaconf-dev2dev >>> _______________________________________________ >>> WiX-users mailing list >>> WiX-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/wix-users >>> >>> >>> >> >> > ---------------------------------------------------------------------------- > >> -- >> Throughout its 18-year history, RSA Conference consistently attracts the >> world's best and brightest in the field, creating opportunities for >> Conference >> attendees to learn about information security's most important issues >> through >> interactions with peers, luminaries and emerging and established >> > companies. > >> http://p.sf.net/sfu/rsaconf-dev2dev >> _______________________________________________ >> WiX-users mailing list >> WiX-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wix-users >> >> >> >> > ---------------------------------------------------------------------------- > -- > >> Throughout its 18-year history, RSA Conference consistently attracts the >> world's best and brightest in the field, creating opportunities for >> > Conference > >> attendees to learn about information security's most important issues >> > through > >> interactions with peers, luminaries and emerging and established >> > companies. > >> http://p.sf.net/sfu/rsaconf-dev2dev >> _______________________________________________ >> WiX-users mailing list >> WiX-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wix-users >> >> > > > ---------------------------------------------------------------------------- > -- > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for > Conference > attendees to learn about information security's most important issues > through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > ---------------------------------------------------------------------------- -- > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ---------------------------------------------------------------------------- -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users