Tuesday, 15 January 2013

wix - Migrating properties in an installer major upgrade -



wix - Migrating properties in an installer major upgrade -

is there way view/migrate properties installation beingness removed new installation in major upgrade workflow?

this shouldn't matter much here's context. i'm using migratefeaturestates prevent users recreating service during major upgrades. problem i'm seeing if user specifies custom folder location service feature upgrade fails service still uses custom path while files installed default location.

service install/control

<serviceinstall id="myserviceinstall" name="myservice" displayname="myservice" account="[user]" password="[pass]" type="ownprocess" start="auto" errorcontrol="normal" /> <servicecontrol id="myservicecontrol" name="myservice" wait="yes" start="install" stop="both" remove="uninstall" />

install sequence

<migratefeaturestates sequence="1001" /> <removeexistingproducts sequence="1020" /> <stopservices sequence="1700" /> <deleteservices sequence="1750"><![cdata[(not upgradingproductcode)]]></deleteservices> <installservices sequence="5800"><![cdata[not(migrate)]]</installservices> <startservices sequence="5900" />

if starting scratch you'd utilize wix remember property pattern, if first product has shipped it's late.

if install folder saved in registry recover wix registry search. otherwise utilize wix component search. you'd utilize component id of service executable , search recover path. you'd utilize in custom action set install folder location.

if using wix major upgrade element sets property called wix_upgrade_detected if you're upgrading, suppress browse dialog if property set.

wix windows-installer wix3.8 major-upgrade

No comments:

Post a Comment