Another option is to create a transitive component to remove the non-versioned 
file.  [The RemoveFiles action runs prior to the InstallFiles action]

An advantage here is that you can condition the transitive component to only 
force-spank the file when you want it to be spanked (depending on what 
conditions / modes you have within your installation).  A disadvantage here is 
that the progress bar will be a little off (depending on file size, etc...).  
WI doesn't appear to compute the progress bar to take into consideration 
removing a file then laying down the same file (go figure :?0 ).





-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Evans, Jim
Sent: Thursday, July 03, 2008 11:56 AM
To: [EMAIL PROTECTED]; General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Forcing overwrite of text file

Thanks for the confirmation Chris. I think this is the last hurdle to my
first fully featured working MSI-based installer. My next installer
project will be considerably more complex, but I've learned a lot from
this experience, and from the list.

Incidentally, for those of you keeping score at home, a better approach
than using the DefaultVersion attribute might be to tie the text file to
a versioned resource using the CompanionFile attribute. This avoids
warnings when you compile your WiX project.

--Jim Evans
Numara Software, Inc.

-----Original Message-----
From: Christopher Painter
Sent: Thursday, July 03, 2008 11:34 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Forcing overwrite of text file

I've been doing it for years without problems.  InstallShield has a
feature called `Always Overwrite` that essentially does this.

The downside to going this is if the file does contain user data, it
will get wasted unless you have a harvest/configure pattern to go before
and after the file copy.  The downside there is you have to know every
attribute that is customizable and explictly preserve it.

The downside to not doing this is if the file does contain user data,
it'll never get updated to a newer version of the shipped file.

You could easily argue that there should really then be 2 files ...
stock.textfile and userdata.textfile but that requires effort on the
upstream application developers and you may or may not have much luck
there.


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 Thu, 7/3/08, Evans, Jim <[EMAIL PROTECTED]> wrote:

> From: Evans, Jim <[EMAIL PROTECTED]>
> Subject: [WiX-users] Forcing overwrite of text file
> To: "General discussion for Windows Installer XML toolset."
<wix-users@lists.sourceforge.net>
> Date: Thursday, July 3, 2008, 10:20 AM
> If I have a text file (or other unversioned resource) that I
> want to
> overwrite during a minor update, is it ok to give the file
> a "version"
> using the DefaultVersion attribute of the File element? It
> seems like
> this works and forces the overwrite only if I increment the
> pseudo-version. I just want to make sure I'm not doing
> something
> outlandishly nonstandard.
>
>
>
> --Jim Evans
>
> Numara Software Inc.
>
>
------------------------------------------------------------------------
-
> Sponsored by: SourceForge.net Community Choice Awards: VOTE
> NOW!
> Studies have shown that voting for your favorite open
> source project,
> along with a healthy diet, reduces your potential for
> chronic lameness
> and boredom. Vote Now at
> http://www.sourceforge.net/community/cca08
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users




------------------------------------------------------------------------
-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to