> How about using Feature/Condition to disable the appropriate Features? Or if 
> you need really fine grained control, maybe Component/Condition.

Yes, that's what I need, but haven't found a way to make it happen with my 
dialogs.

> Maybe it just requires looking at the problem from a different point of view. 
> Trying to be very procedural tends to be very frustrating in a declarative 
> system. You end up fighting the design constantly. I'm still not terribly 
> clear >on your requirements but what you've described thus far seems like it 
> should be pretty easy to do with the Windows Installer, with the right 
> approach.

Rob, there are multiple sequences involved. With coordination between sequences 
and dependencies between nodes within the same sequence. One cannot help 
dealing with this procedurally. Nick's book makes it pretty clear that these 
sequences require close attention.

> Also, I don't think #4 is correct. Costing will be applied to Components 
> which then roll up into Feature costing. As you turn Features on and off, the 
> costing will be adjusted.

If features were specified at installer invocation time or in a dialog early in 
the UI sequence you would be correct. But they are not. As I explained they are 
being determined in a dialog that runs after CostFinalize.

My understanding of #4 is based on the explanation that Nick gives in his book 
(see CostFinalize, Page 118) and perusal of msi test logs confirmed this.

-----Original Message-----
From: Rob Mensching [mailto:r...@robmensching.com]
Sent: Friday, July 29, 2011 12:45 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] RemoveExistingProducts doesn't work in 3.5

How about using Feature/Condition to disable the appropriate Features? Or if 
you need really fine grained control, maybe Component/Condition.

Maybe it just requires looking at the problem from a different point of view. 
Trying to be very procedural tends to be very frustrating in a declarative 
system. You end up fighting the design constantly. I'm still not terribly clear 
on your requirements but what you've described thus far seems like it should be 
pretty easy to do with the Windows Installer, with the right approach.

Also, I don't think #4 is correct. Costing will be applied to Components which 
then roll up into Feature costing. As you turn Features on and off, the costing 
will be adjusted.

On Thu, Jul 28, 2011 at 1:01 PM, Peter Stein <pst...@instec-corp.com> wrote:

> I don't understand all of your explanation starting with "The key here...".
>
> I get what you are saying about the nesting of the features. I was
> already aware of that as I have the book by Nick Ramirez.
>
> However that does not solve the problem. The user still needs to
> select either FeatureA or FeatureB. That takes place via a dialog.
> Whether that dialog is standard or custom doesn't matter, it is part
> of a chain of dialogs. That chain has one or more dialogs which
> require the Directory Manager. The Directory Manager is not
> initialized until after CostFinalize in the InstallUISequence. That
> forces the dialog display to occur between CostFinalize and
> ExecuteAction. *BUT* selected features must already be identified
> before CostFinalize. And that cannot happen with my dialogs because
> they haven't run yet! Remember, my dialog chain has a dependency on DM
> (and it very well could have other dependencies that won't be exposed until 
> an attempt to re-sequence InstallUISequence).
>
> So I don't understand what you mean by "you don't need a separate
> dialog to select the features thus getting feature selection to occur
> at the correct time". A basic design requirement for this installer is
> to be user friendly and consistent with other installers that acquire
> configuration info via dialogs. So I can't get rid of the feature dialog.
>
> Here are the pertinent facts as I see them and how they apply to this
> problem. This is based on the information available to me and I could
> very well be wrong on any of these (working with WiX isn't exactly a
> confidence boosting exercise). If you see one that is wrong and/or
> presents an opportunity for solving the problem please identify it and
> the possible solution approach. Please confine possible solutions to
> the realm of the practical. I've spent far too much time on this
> already and can't afford to take a year long sabbatical to redesign WiX. 
> Thanks.
>
> 1.  I cannot avoid having a feature dialog. The installer must ask the
> user what features are wanted.
> 2. That dialog must be part of the dialog chain. Dialogs must be
> contiguous with no standard UI actions between.
> 3. The dialog chain has one or more dependencies on earlier standard
> UI actions in the InstallUISequence.
> 4. Feature selection must have been made and be available at the time
> of CostFinalize.
>
>
>
> -----Original Message-----
> From: Castro, Edwin G. (Hillsboro) [mailto:edwin.cas...@fiserv.com]
> Sent: Thursday, July 28, 2011 2:02 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] RemoveExistingProducts doesn't work in 3.5
>
> Suppose you have the following components:
> * ComponentA
> * ComponentB
> * ComponentC
> * ComponentD
>
> Suppose that we want FeatureA (subset) to install only ComponentA and
> ComponentB.
> Suppose that we want FeatureB (superset) to install everything in
> FeatureA
> *and* ComponentC and ComponentD.
>
> FeatureB {
>    ComponentC
>    ComponentD
>    FeatureA {
>        ComponentA
>        ComponentB
>    }
> }
>
> The key here is to set FeatureA to follow the parent feature (FeatureB).
> Now in the standard feature selection dialog a user can select only
> FeatureA _or_ they can select FeatureB which automatically selects
> FeatureA. With this approach you don't need a separate dialog to
> select the features thus getting feature selection to occur at the correct 
> time.
>
> Edwin G. Castro
> Software Developer - Staff
> Digital Channels
> Fiserv
> Office: 503-746-0643
> Fax: 503-617-0291
> www.fiserv.com
> P Please consider the environment before printing this e-mail
>
> > -----Original Message-----
> > From: Rob Mensching [mailto:r...@robmensching.com]
> > Sent: Thursday, July 28, 2011 11:40 AM
> > To: General discussion for Windows Installer XML toolset.
> > Subject: Re: [WiX-users] RemoveExistingProducts doesn't work in 3.5
> >
> > 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-fi
> > > le
> > > s-
> > > 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&pr
> > ev
> > > _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
>
> ------------------------------------------------------------------------------
> 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

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

Reply via email to