简体   繁体   English

在VS2012中使用InstallShield更新应用程序

[英]Updating application using InstallShield in VS2012

I am trying to update an application using the Install Shield project in visual studio 2012. 我正在尝试使用Visual Studio 2012中的Install Shield项目更新应用程序。

I have read tons of articles/stackoverflow questions about it, and every single one gives the same steps for updating an existing application: 我已经阅读了很多关于它的文章/ stackoverflow问题,并且每一个问题都给出了更新现有应用程序的相同步骤:

  • Increment product version 增量产品版本
  • Change Product Code 更改产品代码
  • Build Setup 构建设置

So I do exactly that. 所以我就是这么做的。 First I build my application, then I build the setup. 首先,我构建我的应用程序,然后构建设置。 I find the setup, and I run it. 找到安装程序,然后运行它。 It installs the application as expected. 它将按预期安装该应用程序。

Then I make a minor change to my application (changing the background color for example), then I: 然后,我对我的应用程序进行了较小的更改(例如,更改了背景色),然后我:

  • I build the application 我构建应用程序
  • Increment Product version from 1.00.0000 to 1.00.0001 将产品版本从1.00.0000递增到1.00.0001
  • Change the Product Code - I Click the {...} to automatically generate a new one 更改产品代码-我单击{...}以自动生成一个新的
  • Make sure the Update Code is the same 确保更新代码相同
  • Build the setup 建立设定

Go to the same directory I found the setup in before, and run the setup. 转到我之前在其中找到安装程序的目录,然后运行安装程序。 It indicates that it installs, but then when I run the program, it is the original program - and in my Control Panel > Programs, there is now 2 instances of the application. 它表示已安装,但是当我运行该程序时,它是原始程序-在“控制面板”>“程序”中,现在有该应用程序的2个实例。 And in the install directory of the application, it is still the original files. 并且在应用程序的安装目录中,它仍然是原始文件。

I have clicked the resequence RemoveExistingProducts, and still the same thing. 我单击了重新排序的RemoveExistingProducts,仍然是一样的东西。

edit : I am just using the basic version of InstallShield that came with VS2012 编辑 :我只是使用VS2012附带的基本版本的InstallShield

Anyone have any ideas what I am doing wrong? 有人有任何想法我在做什么错吗? I have absolutely no idea what I am doing wrong... 我完全不知道我在做什么错...

As stated within the Upgrade Paths section of InstallShield within VS2012: 如VS2012中InstallShield的“升级路径”部分所述:

If you have released earlier versions of your product and you want to ensure that end users are able to upgrade to the current version without manually installing the earlier version and then also installing the current version, use the Upgrade Paths view to indicate upgrade information. 如果您已经发布了产品的早期版本,并且想要确保最终用户能够升级到当前版本而无需手动安装早期版本,然后又安装当前版本,请使用“升级路径”视图来指示升级信息。

So in order to upgrade any previous installations, you need to add your application's Upgrade Code to the 'Upgrade Paths'. 因此,为了升级以前的所有安装,您需要将应用程序的升级代码添加到“升级路径”。 You can do this from the Solution Explorer: 您可以从解决方案资源管理器中执行此操作:

[InstallShield Setup Project] -> Organize Your Setup -> Upgrade Paths [InstallShield安装项目]->组织您的安装->升级路径

From that tab, you will right-click on the 'Upgrade Paths' option on the left side of the center pane, and select 'New Upgrade Path...'. 在该选项卡中,您将右键单击中心窗格左侧的“升级路径”选项,然后选择“新升级路径...”。 You will then be presented with an option to select an installer (.exe or .msi) for your project which will populate the Upgrade Code field. 然后,您将看到一个为项目选择安装程序(.exe或.msi)的选项,该安装程序将填充“升级代码”字段。 Make sure you set the Min and Max Version fields to specify which versions of your application that you'd like your new installer to upgrade. 确保设置“最低和最高版本”字段,以指定您希望新安装程序升级的应用程序版本。 If you'd like the new installer to upgrade any installed version of your application, then simply set the 'Include Max Version' and 'Include Min Version' fields to no. 如果您希望新安装程序升级您的应用程序的任何已安装版本,则只需将“包括最高版本”和“包括最低版本”字段设置为否。

You should now be set to build your solution, and when running the new installer, you'll find that you will no longer run into the problems you've specified. 现在,您应该设置为构建解决方案,并且在运行新的安装程序时,您将发现您不再遇到指定的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM