开发者

Visual Studio Setup Project that upgrades an existing app

Is it possible to make a SETUP project in Visual Studio that *does not install* but upgrades开发者_开发知识库 an app that already exists on the user's disk ? Example: the user has version 1.1 of the product and we want to send em a SETUP / INSTALLER that upgrades 1.1 to 1.2 ?

Regards, MadSeb


Sure. First you create an installer for the new version.

If the old version was installed by a MSI package:

  • find the old MSI UpgradeCode
  • after building the new MSI open it with Orca
  • go to "Property" table and set the UpgradeCode of the old MSI
  • this way the new package should automatically uninstall the old one

If it was installed by a custom package:

  • in you new package add a custom action which removes the old version (for example launches the old version uninstaller or manually deletes all application resources)
  • make sure the custom action runs before "InstallInitialize" action in "InstallExecuteSequence" table (you can edit the action sequence with Orca)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜