Self updating application install with WIX?

无人久伴 提交于 2019-12-02 19:17:17

Yeah, ClickThrough really is what you're looking for here. There are bits and pieces in it that work. You might be able to dissect the code and use it yourself without all the extra "UI + build integration". Most of the bugs are in the higher levels. At the root, the RSS update and executable bootstrapper work fine.

marc_s

Just how "auto"-update does it have to be? :-)

We use WiX (2.0) for an app that needs to be installed over and over again. As long as you go with "major upgrades" from version to version, that works just fine - you can uninstall the old version and then re-install the new one - no major problems here.

The key is to have a stable "UpgradeCode" (a GUID in your WiX) that never changes - it's the key for your app - and to have a new ProductCode for every release.

Then, in your wxs file, you need two bits:

<Upgrade Id='--your-updatecode-GUID-here--'>
    <UpgradeVersion MigrateFeatures='yes' RemoveFeatures='ALL' />
</Upgrade>

<InstallExecuteSequence>
  <RemoveExistingProducts After='InstallInitialize' />
</InstallExecuteSequence>

That should do it!

Other than that - nothing really much to say - it just works :-)

Windows Installer isn't really designed for "self updating" software. If you don't need MSI, or really need the application to "pull" it's own updates then use NSIS or some other tool and write your own updating routine/service.

However if this is being installed on a large number of desktops within a single organisation, then the better solution would be to deploy an MSI via Active Directory. You can then "push" out updates using Group Policy. This is going to be much more robust than any application that updates itself.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!