I missed this response earlier. Based on my reading of the below, it
definitely sounds like you want a Component/Condition.

Note: insulting (e.g. "Even a new CS grad knows that...") the people that
volunteer to help you by providing free tools and advice isn't terribly
constructive. It is particularly discouraging because your criticism is
misplaced. The Windows Installer (as Edwin noted) provides UI design you are
critical of, not the WiX toolset.

I wish you good luck on your path to understanding declarative installation.

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

> Not sure why this is so difficult to understand. The installer has
> components that are safe to install in some environments/contexts but not in
> others. Yes, the installer could be decomposed into multiple installers each
> of which only installs a single feature but that's just plain goofy as the
> users have the wherewithal to know which feature is appropriate for their
> install. As a safety precaution we simply don't want unneeded executables
> installed when they don't need to be because the individuals using the
> software aren't necessarily the same ones who installed it. You're
> misinterpreting something fairly straightforward because you are looking at
> it through the filter of WiX.
>
> And no, I'm not using a directory path too early. NO, NO, NO!
> In fact the problem is the exact opposite I can't use it early enough. I
> clearly said "after CostFinalize" because only then is the DM initialized. I
> want to move the whole dialog chain towards the front of the
> InstallUISequence as far as it can go, but there are dependencies on the
> standard UI actions.
>
> By now it should be clear what I'm trying to do. A feature dialog is being
> executed *after* CostFinalize and therefore *before* ExecuteAction. This
> dialog determines the set of features to be installed. But the actual
> installation ignores this information. I know why, because it needs to be
> available *before* CostFinalize (see description). But in order to make it
> available *before* the dialog chain would need to be moved up in the
> sequence, something that can't happen because of the DM dependency (and
> possibly others). I think this pretty clearly sums it up.
>
> I'm not trying to sabotage anything, just trying to use a tool to do
> something *very* reasonable. WiX doesn't seem to have the correct coupling
> between the UI and control logic. Or the user documentation that explains
> how to achieve that. Or both. Even a new CS grad knows that you don't start
> processing inputs before the connected UI has even served them up!
>
>
>
> -----Original Message-----
> From: Castro, Edwin G. (Hillsboro) [mailto:edwin.cas...@fiserv.com]
> Sent: Thursday, July 28, 2011 5:22 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] RemoveExistingProducts doesn't work in 3.5
>
> > Yes it does because there are installation scenarios where having the
> > superset installed is potentially dangerous.
>
> So, a user could still select the superset (exclusively) and still end up
> in a "potentially dangerous" scenario... I don't think mutually exclusive
> options help you here. Detecting the potentially dangerous scenario before
> the feature selection dialog and hiding the superset feature might help. My
> point is if somebody has to make the choice to select the superset, then
> does it matter if they also select the subset? They have already selected
> the superset which includes the subset... why restrict them from selecting
> the subset in addition to the superset? In all scenarios they can choose
> only the subset (or none) which is safer, presumably.
>
> > " How exactly do you depend on Directory Manager?"
> >
> > I don't know, but I do know that if I ignore it I'll be spending time
> > on 2732 errors. Obviously the dependency has something to do with one
> > of the dialogs, most likely the "choose installation directory" dialog.
>
> This means you are trying to use the path of a Directory in your package
> too early... (as you identified, before CostFinalize). This is the type of
> dependency I'm talking about. Clearly you are trying to accomplish something
> at the wrong point in time. But we don't have enough context to help you
> figure out what is the appropriate point in time to do it.
>
> > I am not "using it" at all, I'm getting blindsided by it. Until I
> > encountered the first 2732 error I didn't even know that a Directory
> > Manager was in play. Like I said "realm of the practical" . I don't
> > have months to spend on contortions that might get this to work.
>
> "Realm of practical" to me translates into "do things the Windows Installer
> way". Note that I didn't say "WiX way" and there's a very good reason for
> that.
>
> You *will* spend months trying to accomplish something that actively tries
> to sabotage how Windows Installer works, but that's your choice.
>
> 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: Peter Stein [mailto:pst...@instec-corp.com]
> > Sent: Thursday, July 28, 2011 2:37 PM
> > To: General discussion for Windows Installer XML toolset.
> > Subject: Re: [WiX-users] RemoveExistingProducts doesn't work in 3.5
> >
> > " Why must you model the features with an exclusive mode."
> > " I mean, does it really hurt anything (or confuse anybody) if both
> > features are selected?"
> >
> > Yes it does because there are installation scenarios where having the
> > superset installed is potentially dangerous.
> >
> > " How exactly do you depend on Directory Manager?"
> >
> > I don't know, but I do know that if I ignore it I'll be spending time
> > on 2732 errors. Obviously the dependency has something to do with one
> > of the dialogs, most likely the "choose installation directory" dialog.
> >
> > " Perhaps that dependency can be managed differently than how you are
> > currently using it."
> >
> > I am not "using it" at all, I'm getting blindsided by it. Until I
> > encountered the first 2732 error I didn't even know that a Directory
> > Manager was in play. Like I said "realm of the practical" . I don't
> > have months to spend on contortions that might get this to work.
> >
> >
> >
> > -----Original Message-----
> > From: Castro, Edwin G. (Hillsboro) [mailto:edwin.cas...@fiserv.com]
> > Sent: Thursday, July 28, 2011 4:07 PM
> > To: General discussion for Windows Installer XML toolset.
> > Subject: Re: [WiX-users] RemoveExistingProducts doesn't work in 3.5
> >
> > Why must you model the features with an exclusive mode. That's part of
> > your problem. Let go of that requirement and let Windows Installer do
> > most of the heavy lifting for you. You said there's a subset/superset
> > relationship that can be directly modeled using Feature composition.
> > Use that and make your life easier.
> >
> > I mean, does it really hurt anything (or confuse anybody) if both
> > features are selected? Hmm... If having both features selected (in the
> > feature selection
> > dialog) doesn't confuse anybody (use good feature title/description)
> > then you can avoid feature composition and simply use Rob's
> recommendation:
> >
> > FeatureA {
> >     ComponentA
> >     ComponentB
> > }
> > FeatureB {
> >     ComponentA
> >     ComponentB
> >     ComponentC
> >     ComponentD
> > }
> >
> > How exactly do you depend on Directory Manager? Perhaps that
> > dependency can be managed differently than how you are currently using
> it.
> > The Feature table already has a column (Directory_) for configuring a
> > directory in the feature selection dialog. See the
> > ConfigurableDirectory attribute of the Feature element. I think one of
> > the WixUI dialog sets includes a feature selection dialog that lets you
> configure directories...
> >
> > 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: Peter Stein [mailto:pst...@instec-corp.com]
> > > Sent: Thursday, July 28, 2011 1:02 PM
> > > To: General discussion for Windows Installer XML toolset.
> > > Subject: Re: [WiX-users] RemoveExistingProducts doesn't work in 3.5
> > >
> > > 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
> >
> ------------------------------------------------------------------------------
> > 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
>
> ------------------------------------------------------------------------------
> 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

Reply via email to