Is it possible to organize your Components so that one Feature has most Components and the other Feature has less Components? A Component can be installed by two Features. Maybe I'm misunderstanding.
BTW, deleting files that the Windows Installer thinks should be installed is a *very bad* design. You'll end up in an immediate "repair" state that has real potential of creating problems for you all over the place later. ...or maybe I just don't really understand the scenario. On Thu, Jul 28, 2011 at 7:44 AM, Peter Stein <pst...@instec-corp.com> wrote: > I'm not attempting to upgrade anything. I'm trying to use this mechanism to > solve a problem with feature set installation (which I described in another > email). > > Basically my installer users can choose between 2 features in a dialog. The > problem is that the dialog choice is not available at the time of > CostFinalize and it doesn't seem possible to re-sequence the UI standard > actions. So simply modifying ADDLOCAL does not work. > > The relationship between these 2 features is that one is a subset of the > other. So two possible strategies may work: 1. Install the subset and > possibly add the other files, OR 2. Install the superset and subtract (i.e. > remove files). When I discovered the post that contained "RemoveFiles" I was > hopeful that usage of "Remove" elements might lend itself towards a > solution based on the 2nd strategy. But based on your email I appear to be > barking up the wrong tree. > > It looks like it will be necessary to resort to a very ugly kludge, namely > including a helper exe in the installer that will remove the unwanted files. > > -----Original Message----- > From: Wilson, Phil [mailto:phil.wil...@invensys.com] > Sent: Wednesday, July 27, 2011 7:10 PM > To: General discussion for Windows Installer XML toolset. > Subject: Re: [WiX-users] RemoveExistingProducts doesn't work in 3.5 > > There's a lot of other stuff that needs doing for upgrades to work, and you > haven't said if you actually have it, such as upgrade specifications in your > WiX. > > I'd look at all your FindRelatedProducts actions in your install to see if > they report anything about finding older versions of your product. > > It's also not obvious that this is a solution to your problem, whatever it > is. During an upgrade the state of files being installed or removed is about > whether they have the same component guids or not. In the scenario where > RemoveExistingProducts after InstallFinalize works, look at it something > like this as a general flow guide: > > Every file in your original install has a guid associated with it. > > All the files in your upgrade where you want to replace the old file with > your new file need the same component guid. > > The upgrade install runs. Every file gets replaced, based on file version > rules where applicable. Where the component guids are identical the ref > count on that guid increments from 1 to 2. > > At the end the RemoveExistingProducts runs. It will look at each file's > guid and decrement the ref count. If it goes from 2 to 1 the file will not > be removed (it's in use by the product you just installed). If the ref count > on a guid goes down to zero then nothing is using it. So it gets removed. > > If you don't want filexyz.exe in the product then just don't put it in your > upgrade. Once you get the upgrade really working with > RemoveExistingProducts, if it's not being removed then something else is > going on (clobbered ref counts, marked permanent etc). > > Phil Wilson > > > -----Original Message----- > From: Peter Stein [mailto:pst...@instec-corp.com] > Sent: Wednesday, July 27, 2011 4:40 PM > To: 'WiX-users@lists.sourceforge.net' > Subject: [WiX-users] RemoveExistingProducts doesn't work in 3.5 > > I based my code on this: > http://stackoverflow.com/questions/3287626/wix-installer-remove-files-on-uninstall-but-not-on-upgrade > > I saw no complaints about the suggested answer so I assumed it worked. But > when I adapted to my code it does nothing. > In product.wxs: > > <InstallExecuteSequence> > <RemoveExistingProducts > After='InstallFinalize'>1</RemoveExistingProducts> > </InstallExecuteSequence> > > And in my main installation directory I added: > > <Component Id="RemoveFilesComponent" > Guid="A749202E-E09A-4DED-B205-337B0E7FB736"> > <RemoveFile Id="R1" On="both" Name="filexyz.exe"/> </Component> > > The installer runs and completes without error or warnings, but filexyz.exe > is not removed. As an experiment I tried "*.*", but that didn't remove > anything neither. > The msi.log shows RemoveExistingProducts being invoked, but it doesn't > remove anything. > > What am I missing? > > ------------------------------------------------------------------------------ > Got Input? Slashdot Needs You. > Take our quick survey online. Come on, we don't ask for help often. > Plus, you'll get a chance to win $100 to spend on ThinkGeek. > http://p.sf.net/sfu/slashdot-survey > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > *** Confidentiality Notice: This e-mail, including any associated or > attached files, is intended solely for the individual or entity to which it > is addressed. This e-mail is confidential and may well also be legally > privileged. If you have received it in error, you are on notice of its > status. Please notify the sender immediately by reply e-mail and then delete > this message from your system. Please do not copy it or use it for any > purposes, or disclose its contents to any other person. This email comes > from a division of the Invensys Group, owned by Invensys plc, which is a > company registered in England and Wales with its registered office at 3rd > Floor, 40 Grosvenor Place, London, SW1X 7AW (Registered number 166023). For > a list of European legal entities within the Invensys Group, please go to > http://www.invensys.com/legal/default.asp?top_nav_id=77&nav_id=80&prev_id=77 > . > > You may contact Invensys plc on +44 (0)20 3155 1200 or e-mail > recept...@invensys.com. This e-mail and any attachments thereto may be > subject to the terms of any agreements between Invensys (and/or its > subsidiaries and affiliates) and the recipient (and/or its subsidiaries and > affiliates). > > > > > ------------------------------------------------------------------------------ > Got Input? Slashdot Needs You. > Take our quick survey online. Come on, we don't ask for help often. > Plus, you'll get a chance to win $100 to spend on ThinkGeek. > http://p.sf.net/sfu/slashdot-survey > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > ------------------------------------------------------------------------------ > Got Input? Slashdot Needs You. > Take our quick survey online. Come on, we don't ask for help often. > Plus, you'll get a chance to win $100 to spend on ThinkGeek. > http://p.sf.net/sfu/slashdot-survey > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > -- virtually, Rob Mensching - http://RobMensching.com LLC ------------------------------------------------------------------------------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users