Ah.. I see now that the component had to be marked as transitive from the
beginning, otherwise when the patch is removed it will no longer be
transitive and therefore the condition will not be checked and no install
will be performed (at least that's my logic to explain what's going on).
When I modified the original MSI to mark it as transitive with condition
1=1, applied my patch with condition 1=0, then removed my patch, the
Dance.txt file and Shortcut were restored.

*** So should components always be marked as transitive? ***

Thanks,
-Ryan Parlee



-----Original Message-----
From: Ryan Parlee [mailto:list...@jesca.com] 
Sent: Wednesday, December 31, 2008 4:48 PM
To: chr...@deploymentengineering.com; General discussion for Windows
Installer XML toolset.; John Robbins
Subject: [WiX-users] Problem with Transitive Components - Previously RE:
WIX3 - Suggestions

*** Why you need to keep a zero length file around?  ***

1. I did all of the MNP2000 sample projects from MSDN (yes, by hand) and was
able to simply create a patch that marked the Dance component as transitive
with condition 1=0 and it properly removed the Dance.txt File resource upon
application of the patch.  All this with no actual Dance.txt in my patch
path.

2. An interesting observation is that once the component has been removed
using this approach there is no way to get it back.  If I remove the "Remove
Dance Component" patch, for example, the Dance.txt file does not get
reinstalled.  It also does not work to do a Repair on the original MNP2000
MSI; the Dance.txt file is still not installed.  The only thing that works
is to remove the product entirely and reinstall with the original MSI.

3. On the other hand, using the RemoveFile table strategy I was able to get
the Dance.txt File resource to reinstall upon removal of the patch.  With
this patch, I left every component and file the same and simply added the
Dance.txt file to the RemoveFile table.  It seems that the RemoveXXXX table
strategy is superior in this regard because it can be removed without
"breaking" things.  However, with this strategy there is simply no way to
remove other types of resources such as Shortcuts.  


*** Has anyone else experienced the problem with transitive components that
I describe in paragraph 2 above? ***


-Ryan Parlee




-----Original Message-----
From: Christopher Painter [mailto:chr...@deploymentengineering.com] 
Sent: Tuesday, December 30, 2008 3:14 PM
To: General discussion for Windows Installer XML toolset.; John Robbins
Subject: Re: [WiX-users] WIX 3 - Suggestions

All you need to do is set the components Transitive attribute to Yes and
give it an inner element of Condition and give it a no-op expression that
always evaluates to false  like 1=0 or GoToHell=666.   The component still
has to have the same file elements ( components are immutable ) so the files
have to exist... even if they are just 0 bytes in size.

Conceptually it's easy.  The harder part is keeping track of the collection
of files from build to build and then walking the install source to make
sure you do the above modifications to the correct elements.


Christopher Painter, Author of Deployment Engineering Blog
Have a hot tip, know a secret or read a really good thread that deserves
attention? E-Mail Me


--- On Tue, 12/30/08, John Robbins <j...@wintellect.com> wrote:

> From: John Robbins <j...@wintellect.com>
> Subject: RE: [WiX-users] WIX 3 - Suggestions
> To: "chr...@deploymentengineering.com" <chr...@deploymentengineering.com>,
"General discussion for Windows Installer XML toolset."
<wix-users@lists.sourceforge.net>
> Date: Tuesday, December 30, 2008, 11:04 AM
> Christopher,
> 
> Can you show me an example of what the before and after
> would look like in WiX format? If you can, I'll get this
> added to my Paraffin tool.
> 
> John
> Wintellect
> http://www.wintellect.com
> 877-968-5528
> 
> 
> >-----Original Message-----
> >From: Christopher Painter
> [mailto:chr...@deploymentengineering.com]
> >Sent: Monday, December 29, 2008 11:25 PM
> >To: General discussion for Windows Installer XML
> toolset.
> >Subject: Re: [WiX-users] WIX 3 - Suggestions
> >
> >MSI does a handful of things very well at the expense
> of just about
> >everything else.    They'll never say it's a
> flaw, they'll just say
> >that's how it works.
> >
> >The reality is the upgrade/component rules are a PITA
> and require great
> >discipline to implement.   I guess that's why Rob
> posted a thread the
> >other day saying that they choose Major Upgrades for
> WiX since they
> >don't follow the component rules on a daily basis.
> (  This has basically
> >been my philosophy for the last 5 years ... aka Major
> Upgrades "Don't"
> >suck ).
> >
> >In the times that I've choosen to support minor
> upgrades, I wrote an
> >MSbuild task for TFS that reads an xml file that
> contains a list of
> >deprecated components.  For each file, it creates a 0
> byte file ( since
> >the upstream build doesn't generate it anymore )
> and then updates the
> >installer source to mark the component as transitive
> and assign it a no-
> >op condition.
> >
> >It's a pain, but it does work.
> >
> >--- On Tue, 12/30/08, John Robbins
> <j...@wintellect.com> wrote:
> >
> >> From: John Robbins <j...@wintellect.com>
> >> Subject: Re: [WiX-users] WIX 3 - Suggestions
> >> To: "General discussion for Windows Installer
> XML toolset." <wix-
> >us...@lists.sourceforge.net>
> >> Date: Tuesday, December 30, 2008, 12:46 AM
> >> My Paraffin tool does keep the same GUIDs for the
> files when
> >> you run it repeatedly. For the itch I was trying
> to scratch
> >> was for projects that were always adding files not
> removing
> >> files.
> >>
> >> As Bob points out, removing files is the problem.
> I've
> >> found two discussions that talk about removing
> files. The
> >> first is here:
> >>
> http://trentm.com/blog/archives/2007/05/29/wix-and-msp/. The
> >> idea is you replace the <File> element with
> a
> >> <RemoveFile> like the following:
> >>
> >> <Component Id='AnotherFile'
> >>
> >>
> Guid='C7D97EA9-83DF-4B07-8E38-D10A30F70FD2'>
> >>   <RemoveFile Id='RemoveFile'
> >> On='install'
> Name='NewFile.txt'/>
> >> </Component>
> >>
> >> In my installers, I'm using patches to upgrade
> and the
> >> above trick does work.
> >>
> >> The second is discussed here:
> >>
> >http://geekswithblogs.net/Vagmi.Mudumbai/archive/2006/06/11/81426.aspx,
> >> which involves some interesting jujitsu of
> transitive bit on
> >> the component and create a zero byte file. I
> don't even
> >> know how to express that in WiX format. :)
> >>
> >> Not being much of an installer guru (I'm still
> at the
> >> stare in confused stage) I've wondered if
> either of
> >> these are both good ideas. If so, I could add the
> >> appropriate option to Paraffin to handle the
> removed file
> >> case.
> >>
> >> If there are no good solutions for the removed
> files
> >> problem does that mean that there's a flaw in
> the
> >> installer technology?
> >>
> >> John
> >> Wintellect
> >> http://www.wintellect.com
> >> 877-968-5528
> >>
> >>
> >> >-----Original Message-----
> >> >From: Bob Arnson [mailto:b...@joyofsetup.com]
> >> >Sent: Monday, December 29, 2008 7:04 PM
> >> >To: General discussion for Windows Installer
> XML
> >> toolset.
> >> >Subject: Re: [WiX-users] WIX 3 - Suggestions
> >> >
> >> >Rob Mensching wrote:
> >> >> For Components with one file each...
> maybe.
> >> It's the closest we've
> >> >come.  Still experimental (one reason it
> isn't
> >> documented well).
> >> >>
> >> >
> >> >It breaks down whenever files are removed,
> which is a
> >> problem especially
> >> >for Web apps.
> >> >
> >> >--
> >> >sig://boB
> >> >http://joyofsetup.com/
> >> >
> >> >
> >> >
> >>
> >---------------------------------------------------------------------
> >---
> >> >------
> >>
> >_______________________________________________
> >> >WiX-users mailing list
> >> >WiX-users@lists.sourceforge.net
> >>
> >https://lists.sourceforge.net/lists/listinfo/wix-users
> >>
> >>
> ----------------------------------------------------------------------
> >--------
> >> _______________________________________________
> >> WiX-users mailing list
> >> WiX-users@lists.sourceforge.net
> >>
> https://lists.sourceforge.net/lists/listinfo/wix-users
> >
> >
> >
> >
> >------------------------------------------------------------------------
> >------
> >_______________________________________________
> >WiX-users mailing list
> >WiX-users@lists.sourceforge.net
> >https://lists.sourceforge.net/lists/listinfo/wix-users


      

----------------------------------------------------------------------------
--
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


----------------------------------------------------------------------------
--
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to