Login to participate
Endpoint Management & Virtualization ArticlesRSS

Upgrades Walkthrough

DavidLockwood's picture

In my previous article I discussed the theory behind different types of upgrades. This article provides a step-by-step walkthrough of how to create a Minor Upgrade and a Major Upgrade with the Wise tools.

Walkthrough: Creating a Minor Upgrade

  1. With Windows Explorer create a folder called Versions. Create three sub-folders within it named 1.0, 1.1, and 2.0. You will store different versions of a package in each sub-folder.
  2. With the Windows Installer Editor choose File menu > then the New option. Choose Windows Application and click OK.
  3. Once the new WSI files appears choose the File menu > Save As option. Save the WSI file under the Versions\1.0 folder you create previously. Name the file Versions.wsi.
  4. Under the Installation Expert tab choose the Product Details option.
  5. Fill in the Product Name field with the value 'Versions'.
  6. Fill in the Default Directory filled with 'Program Files\Versions'. To do this choose the Change button on the right hand side of the pane. It will open a new window with a default value of Program Files. Choose the New Folder button and create a new folder 'Versions' under 'Program Files'.
  7. Go to the Files view under the Installation Expert tab and add one file of your choosing. I suggest notepad.exe from the %WinDir% folder (The default on XP for this is C:\Windows and on a W2K machine it is C:\Winnt). Add this file to the default INSTALLDIR directory which you have set to Program Files\Versions.
  8. Compile the package using the compile button on the bottom right hand side of the editor.
  9. Check the Versions\1.0 folder. Make sure a new MSI file has been created alongside the WSI file. This is our base MSI.
  10. Open the WSI file in the Versions\1.0 folder. Or just return to the editor if you still have it open.
  11. Choose the File menu > Save As option. Save the WSI file under the Versions\1.1 folder you create previously. Name the file Versions.wsi.
  12. Using the files view you should add one DLL to the package. Add the file to the default INSTALLDIR directory which you have set to 'Program Files\Versions'. You can add any DLL but I recommend choosing something from the %Windir%\System32 folder.
  13. Compile the package using the compile button on the bottom right hand side of the editor.
  14. Check the Versions\1.1 folder. Make sure a new MSI file has been created alongside the WSI file. This is our base MSI.

    You now have a base version 1.0 MSI and an upgraded version 1.1 MSI which contains one extra file. You must now use the UpgradeSynch tool to make the version 1.1 MSI in to a valid minor upgrade.

    If you have read the explanation of a Minor Upgrade you will have realised that the PackageCode and ProductVersion property will have to be modified. The UpgradeSynch tool will do this automatically for you.

  15. From the tools tab of the main Wise Package Studio product select the UpgradeSynch tool. Make sure you have closed the Wise for Windows Installer Editor tools before you launch UpgradeSynch.
  16. Launch the UpgradeSynch tool. On the first window specify the path to the WSI which must be modified. This will be the latest version. So specify the Versions.WSI file which is stored under your Versions\1.1 folder.
  17. Click Next. On the next screen specify the versions.wsi in the 1.0 folder. Make sure you have selected .WSI from the 'File of Type' drop-down selection box at the bottom of the window.
  18. Click Next. On the following window select Minor Upgrade and modify the Current Version field to contain 1.1.0.
  19. Click next. On the next window no errors should appear. Click Finish.
  20. Open the Versions\1.1\Versions.wsi. Verify that the ProductVersion property has been incremented to 1.1 under the Product Details view in the Install expert tab. Compile the wsi.
    Now we are ready to test the Minor Upgrade!
  21. Install the MSI for version 1.0.
  22. Try to install the MSI for version 1.1.
  23. If you have done everything correctly the versions 1.1 package will not install and you will see the following message. This is normal. It is not possible to install a Minor Upgrade by double-clicking. If you do not see this message the UpgradeSynch has not worked. Go back and do it again.

    The message appears because the Windows Installer engine has detected another install with the same ProductCode on the machine. The only way to install this minor upgrade is with a command line.

  24. Go to a command prompt by choosing the windows start menu > run and typing cmd
  25. Enter the command line :
    Msiexec /I "C:\Wise Share Point\Projects\Versions\1.1\versions.msi" REINSTALL=ALL REINSTALLMODE=vomus
    
    

    You might have to modify the path to the MSI file if yours is stored in a different place.

  26. Verify that the install takes place correctly. Check Add/Remove Programs. There should be only one entry for versions and it should be latest version 1.1.

Walkthrough: Creating a Major Upgrade

  1. In this exercise you will add to the folders you created in the previous exercise. Open the versions.wsi in the 1.1 folder. Choose File > Save As. Save a copy under 2.0 folder. Name this Versions.wsi.
  2. Remember that with a Major Upgrade you are able to add a new top-level feature. So let's do that. Go to the Features view under the Installation Expert. Choose the Add button on the right side. Fill out the details for the feature. You could, for instance, name it NewMajorUpgradeFeature. Make sure the Parent: field is set to <None> so it does not become a sub-feature.
  3. Add some files to the new Feature using the Files view under the Installation Expert. With a Major Upgrade there is no limitation on what you can do so feel free to add as many files as you want. Remember though if you add a lot of files it will take the Wise for Windows Installer Editor a long time to process this.
  4. Compile the new package using the Compile button on the bottom right-hand of the window.
  5. Check to make sure you have a new MSI package in the 2.0 folder.

    Now you have a base and an upgraded version you are ready to create a Major Upgrade. There are two steps:

    1. Run UpgradeSynch to correctly modify the ProductCode, PackageCode and ProductVersion.
    2. Use the Upgrades view in the Installation Expert to populate the Upgrade table. This will remove the previous version.
  6. Run the UpgradeSynch tool from the Tools tab under Wise Package Studio. At the first window click the Browse button and select the versions.wsi file in the 2.0 folder. Before running the UpgradeSynch tool ensure that all Wise for Windows Installer Editor windows are closed.
  7. Click Next. At the next window click the Browse button and choose the wsi in the 1.1 folder. Remember to select Files of type at the bottom of the screen in order to select the WSI rather than the MSI file.
  8. Click Next. On the following window select the radio button for Major Upgrade and set the Current Version field to 2.0.
  9. Click Next. On the following window no errors should appear. Click Finish.
  10. Re-open the versions.wsi from the 2.0 folder. Make sure that the Version filed under the Product Details view has been incremented to 2.0.0.
  11. At this point the UpgradeCode, ProductCode, PackageCode and ProductVersion should be correctly configured. Now you must populate the Upgrade table. Select the Upgrades view from the Installation Expert tab.
  12. Select the Add button on the right hand side and browse to the versions.msi file under the 1.1 folder. When the Upgrade Details window appears you do not have to modify anything. Leave all the defaults and click OK. Compile.
  13. Now the Upgrade table, viewable under the Setup Editor tab > Tables view has been filled in. This will automatically remove the previous version at install time.
    Now you are ready to test the Major Upgrade!
  14. 14. Make sure the versions.msi in the 1.1 folder is installed on the machine. Now double click the versions.msi in the 2.0 folder. It should automatically detect and remove the previous version. When you look in Add/Remove programs you should see only one Versions with a version number of 2.0.

    If you see multiple entries for Versions in Add/Remove programs the upgrade process has not worked correctly. The Upgrade table was probably not filled in correctly.

jsjj01's picture

Possible switch

I have been contemplating switching to Wise from Installshield and with this new forum and the great info being added I may just do that. Thanks for the tip I will be doing a demo of Wise and want to get the most out of it.

John

Harsh's picture

Hi David, Great effort and

Hi David,

Great effort and very good document on upgrades.

Just want to update this discussion with very most important inbuild custom Action i.e RemoveExitingProduct. This custom action is responsible for every major upgrade, it needs to be set between InstallValidate and InstallIntialize. If this custom action is not properly placed, then the upgrade won't take place.
This was mentioned in your previuos article but you not refer the same thing here.
I guess even thats require here.

Beekeeper2020's picture

Upgrade problem using 7.3.0.250 WiseEditorVersion

 I am using 7.3.0.250 WiseEditorVersion.  Is this the latest version.  After selecting the Major Upgrade feature, it still prompt the following:

Another version of this product is already installed.  Installation of this version cannot continue.  To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.

How do I figure out what is wrong?

Thanks! 

Beekeeper2020's picture

 This is what I would like to

 This is what I would like to see.  I install version A. Everything install without problem.  Now I want to install version B.  What I would like to see is that it will uninstall A or always overwrite the Installation of A automatically.  The "Add/Remove Programs" will always have the latest, in this case the Installation of B in there.

Thanks! 

Beekeeper2020's picture

 Can someone show me what the

 Can someone show me what the upgrade table looks like in the GUI?  
There seems to be a problem with the WiseEditorVersion 7.3.0.250 where I cannot change the Minimum and Maximum version.