That's a good option to keep in mind.  Another option I recently came up
with is to sneakily rename the "Sample" directory via a custom action - it
then is not recognized during upgrade and is left intact.  I already have a
custom action that updates some files, so adding the rename would be
trivial.  This probably isn't an option for most folks though.

Leigh

On Thu, Dec 2, 2010 at 4:14 AM, Rob Hamflett <r...@snsys.com> wrote:

> You could keep the component in the installer, but condition it based on
> whether or not a previous
> install was discovered.
>
> Rob
>
> On 01/12/2010 15:57, Leigh Wetmore wrote:
> > Hi,
> >
> > I'm doing an upgrade of a product.  The WIX in the original installer
> > (1.0) for one relevant component looked like this:
> >
> > <Directory Id="Sample" Name="Sample">
> >    <Component Id="SampleRules" Guid="{my-guid}">
> >      <File Id="myxmlfile.xml" Name="myxmlfile.xml" KeyPath="yes"
> > Source="..\pathtomyfile\myxmlfile.xml" />
> >    </Component>
> > </Directory>
> >
> > In the WIX for the new installer (1.1), I've removed the Sample
> > directory and the file - I don't want them installed for a fresh 1.1
> > install.  However, during upgrade, if the directory exists, I want to
> > keep it - even if the user hasn't modified the file.
> >
> > Unfortunately I didn't forsee the need to remove the folder/file until
> > now, so I've lost my chance to add a Permanent attribute to the
> > Component in the 1.0 installer.
> >
> > Is there a way to somehow block the removal of the component during
> > upgrade to 1.1, but not install it if it is a fresh install?
> > Hopefully my ignorance a while back hasn't sunk me now.
> >
> > Thanks,
> > Leigh
> >
> >
> ------------------------------------------------------------------------------
> > Increase Visibility of Your 3D Game App&  Earn a Chance To Win $500!
> > Tap into the largest installed PC base&  get more eyes on your game by
> > optimizing for Intel(R) Graphics Technology. Get started today with the
> > Intel(R) Software Partner Program. Five $500 cash prizes are up for
> grabs.
> > http://p.sf.net/sfu/intelisp-dev2dev
>
>
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to