c# - On WIX how do I copy a file from an older installation when re-installing -
i have product uses wix install. install sequence:
<installexecutesequence> <removeexistingproducts before="installinitialize" /> </installexecutesequence>
which understand, deletes entire older version upon re-installation. behavior want preserve, want re-create specific file older version.
how do it?
to want deployment of new msi impossible because cannot execute custom action before removeexistingproducts requires elevated privileges (this might work if not installing in uac controlled folder prgram files - have never tried that).
one workaround modify existing msi creating bootstrapper (i have no thought if works tho!)– see reply question: how execute custom action before removeexistingproducts after="installvalidate" in wix
when have written installers in past, have written custom action copies files out temporary folder on uninstall (the uninstall previous version of msi gets called new msi when upgrade) , inspect , clear folder out when new msi installs (the upgrade part). approach leave lot of files hanging around if uninstall (not upgrade) interested in configuration files – works out quite if client returns won't have lost configuration.
this of course of study not prepare immediate problem start working after version backs relevant files on uninstall distributed – has worked me lastly 3 years.
hth
c# wix
No comments:
Post a Comment