Creating an updateable setup using Install Shield that ships with VS2012

天大地大妈咪最大 提交于 2019-12-01 03:10:25

问题


I'm trying to use Install Shield LE to package an distribute a winforms app. This is working well and I even have .net 4.5 redistributable packaged in the setup.exe. The issue I am having is I am now creating a version 1.4 of my app, and I want it to successfully uninstall the old versions (1.0 thru 1.3) and install the new. So far I haven't been successful; every time I run the new setup.exe I get a warning saying that the current version has to be uninstalled first using programs and features in control panel.

Does anyone have a decent tutorial or some guidance that could help me improve my customer experience by having my new version replace the old?

Many thanks,

Jason.


回答1:


In the visual studios project explorer, under your installshield project are a number of page entries. One is called 'General Information' (Under 'Organize Your Setup'), and includes a few sections. The first section is called, 'General' and the first few fields are "Product Name", 'Product Version", "Product Code", and "Upgrade Code".

To create a new installer (setup.exe) that will UPGRADE a current installation, if it exists, there are a few things to do. The key in the way it knows to upgrade a current installation is the "Upgrade Code". If this code is the same as the Upgrade Code defined in the original installation (from the original setup.exe), it will update your installation.

To create an update setup.exe file:

  1. Open the "General Information" page.
  2. In the General section (Top section):
    1. Change the product version to your new version number.
    2. Change the "Product Code" (NOT THE UPGRADE CODE!).
      1. You can do this by clicking the {...} icon at the end of the Product Code field.
  3. Finally, create a new upgrade path.
    1. Open the "Upgrade Path" page under the 'Organize Your Setup' section.
    2. Right click on "Upgrade Paths" in the tree view on the far left, and select "New Upgrade Path...". This will create a new entry in the tree view. Name it whatever you like.
    3. Click on the entry you just created, to bring up the properties in the window on the right. The first field is "Upgrade Code". This code needs be the same as the code used in the prior installation. If it is different, your installation will install another instance of your program (if the product code is also the same, you would get the "Uninstall other program first" message).
    4. Fortunately, the "Upgrade Code" of your original setup.exe is easy to get. In the Upgrade Code field, there is an ... icon. Clicking this will open up a file browser. Set it to show "All files" as its default is msi files only.
    5. Navigate to the setup.exe file used in the original installation and select it. It will populate some fields for you, including the original Upgrade Code. You will notice it also sets max and min version numbers to the version number of the original setup.exe. Set the max version number to the version number of your new setup.exe that you defined in the General section of the General Information page.

You're set! Build the solution, and the new setup.exe will upgrade a previous installation (with the same Upgrade Code).

Check out this page. It covers the same material, bit with pictures! http://syncor.blogspot.com/2013/03/doing-upgrades-with-installshield-le.html



来源:https://stackoverflow.com/questions/20529510/creating-an-updateable-setup-using-install-shield-that-ships-with-vs2012

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