> I did it with a custom action, but that's admitting failure :)
 
That's exactly what I'm also trying to achieve. Can't believe one needs a
custom action for that, but it seems that way!
 
Whatever I tried so far, MSI never always does the right thing on
install/repair/major upgrade/uninstall. 
 
-Mark

  _____  

Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von dB.
Gesendet: Freitag, 4. April 2008 14:19
An: wix-users@lists.sourceforge.net
Betreff: [WiX-users] How do I preserve a configuration file on a
majorupgrade?



I am doing a major upgrade of a service application.

 

I managed to preserve the service information by removing InstallServices
and DeleteServices during UPGRADINGPRODUCTCODE and
OLDERVERSIONBEINGDETECTED. This has one drawback that I can't add a new
service to the application any more during a major upgrade. I can live with
that for now.

 

    <InstallExecuteSequence>

      <FindRelatedProducts Before="LaunchConditions" />

      <RemoveExistingProducts After="InstallValidate" />

      <InstallServices>NOT OLDERVERSIONBEINGUPGRADED</InstallServices>

      <DeleteServices>(NOT OLDERVERSIONBEINGUPGRADED) AND (NOT
UPGRADINGPRODUCTCODE)</DeleteServices>

    </InstallExecuteSequence>

 

I have a configuration file config/Config.xml, that I managed to preserve by
copying a Config_Original.xml to Config.xml at clean install only (never
install Config.xml). I couldn't get this to work with CopyFile - it never
ran without a FileId or forced a file to be uninstalled otherwise. I did it
with a custom action, but that's admitting failure :)

 

  <CustomAction Id="CopyConfigXml" Directory="config" ExeCommand='cmd.exe /Q
/C "copy Config_Original.xml Config.xml"' Return="check" Execute="deferred"
/>

  <InstallExecuteSequence>

   <Custom Action="CopyConfigXml" Before="StartServices">(NOT Installed) AND
(NOT OLDERVERSIONBEINGUPGRADED)</Custom>

  </InstallExecuteSequence>

 

Question: how do I do the config.xml file part cleanly and maybe a better
way for the service part?

 

Thx

dB.

 

-dB.

 <http://www.dblock.org/> dblock.org /  <http://www.foodcandy.com/>
foodcandy.com

 

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to