There is a good explanation of how it to do it here:
http://wix.mindcapers.com/wiki/Upgrade
If you add RemoveExistingProducts to the InstallExecuteSequence after
InstallFinalize, it will do what you want in terms of only upgrading the
files you want. (see the link to the MSDN article for an explanation).
Adding the NEWAPPFOUND and the custom action entry is not really
necessary, but it prevents downgrade (installing an older version over a
newer one).
Unfortunately you do have to recreate the registry entries as far as I
know. In order to save a value from a registry entry, you can use a
RegistrySearch:
<Property Id="MYSETTING_RETRIEVED" Value="my default">
<RegistrySearch Id="GetMySetting" Type="raw" Root="HKLM"
Key="SOFTWARE\x\y\z" Name="MySetting" />
</Property>
Then use this property to set the registry value.
<RegistryValue Root="HKCR" Key="SOFTWARE\x\y\z" Name="MySetting" Value="
[MYSETTING]" Type="string" Action="write" />
The first time you install it will use the default value, but during
upgrades the registry search save the previous value in a property, and
then write the same value again. I'm not sure if my syntax is totally
correct here, but you get the idea.
The opinions expressed here are my own and don’t necessarily represent
IBM’s positions, strategies or opinions.
From:
Chris Lord <[email protected]>
To:
wix-users <[email protected]>
Date:
12/11/2008 04:22 PM
Subject:
[WiX-users] Simple upgrade.
Hi all,
I am somewhat perplexed with the whole upgrade path. I have read and
re-read the Wix docs, the MSDN data, months of WiX posts relating to
upgrading and anything else I can get my hands on. The more I read, the
more confusing it gets and the less I seem to understand. I am hoping
someone can shed some light.
My install contains the main .EXE application and a few support files of
which all but one do not change. When we create a new version,
generally all that changes is the .EXE and once in a while, the support
file. What I'd like to achieve is this.....
I want to supply the end user with an MSI. When run, it detects if a
previous version has been installed. If it hasn't then it go ahead and
installs everything. If a previous install is found, it should just
update the EXE file and maybe the support file as needed.
>From what I have read, it appears that an upgrade requires
uninstallation of the original software but there are settings set up by
the user in the registry which would also be removed. I'd like to save
the user from the hassle of having to setup things up again. Is this
possible and if so how?
Thanks
Chris Lord
Attero Tech LLC.
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,
Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users