The main pitfalls are likely to be the default overwrite rules. If you are
referring to versioned binaries then Windows won't replace a versioned file
with one of a lower version for the (hopefully) obvious reason that a higher
version means a later improved version. Data file overwrite rules involve
timestamps and hashes. 

However, does "freshly installed" mean that your install has just installed
a file and now you want to replace it with a different one? If so, you are
breaking the rules because Windows knows what files you have installed and
if you break that file set then there it's possible that a repair will
restore the original version from the MSI file, asking for the install
source if necessary.

Phil 

-----Original Message-----
From: kpeters58 [mailto:kpet...@otaksoft.com] 
Sent: Friday, November 09, 2012 3:24 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Noob question: Conditional overwrite

Hi all, 

I need to detect if a file with name xxx sits beside the MSI during install
and if it does, copy it
 
A) over top of a freshly installed file by the same name in the product
directory (in case of a  fresh install) 

B) over top of an already existing file by the same name in the product
directory (in case of an
 update) 

I believe that I need to use CopyFile and FileSearch to achieve this but am
not clear on how to do  this; for instance, does sequencing come into play
(in the case of A) obviously the file copying  must already have happened
before I can attempt to overwrite). 

Any pitfalls around sufficient rights to overwriting files? 



Thanks for any pointers,
K 



--
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Noob-question-
Conditional-overwrite-tp7581849.html
Sent from the wix-users mailing list archive at Nabble.com.

----------------------------------------------------------------------------
--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to