December 29, 2009

How do you create an un-installable Patch using InstallShield?

Patches are software updates designed to fix problems in the installed product by providing a modified file(s) / registry entry or new file(s). This post explains how to create an un-installlation patch (either an Update.exe or .msp file) using Installshield 2010.
Steps to Build the Latest MSI for Patch Creation

  1. Copy the Base Installer or previous Hot fix folder (ism file, staging area etc.,) to a separate folder.
  2. Rename the ism file to PRODv1.0SPxxHFyy.ism in the new folder (SPxxHFyy)
    • Rename the previous Hot fix folder also to PRODv1.0SPxxHFyy
    • Delete any folders (PRODv1.0SPxxHFyy -1) related to previous within it
  3. Open the ism file and modify the following• Summary Information Stream -> Title as “PROD 1.0 (v1.00.xxyy)”
    -  Product Properties -> Name as “PROD 1.0 (v1.00.xxyy)”
    -  Product Properties -> Version of the product 1.0.xxyy
  4. Generate new Package Code
  5. Create a Path Variable - <PATCHDESIGN> pointing to PatchDesign directory, which will point to the uncompressed msi and product files for base product as well as latest version.
  6. If the same Patch is executed for the second time, it should be able to detect and prompt that the PATCH is already applied. You can achieve this with the following steps
    "Add a VBScript Custom Action (stored in binary table) to check if the version information for current installer (PATCH) and the Base Installer (already installed) are same, then prompt a message saying that the upgrade is already installed and abort. "
  7. In Direct editor make sure that there are no new entries in table ‘Create Folder’. If any new entries are there, delete them. 
  8. Edit the Path variables for staging area and installer resources to point to appropriate folder.
  9. Build the latest MSI and this will be your "Latest Installer" for Patch Design.
Creating a new Patch
  1. Go to Media -> Patch Design. Right click and select ‘Add New Patch Configuration’. Rename the new ‘PatchConfiguration1’ in the format PRODVVSPxxHFyy (say PROD10SP02HF01).  
  • Common -> De-select “Create Update.exe”, if you wanted to create an update as .msp file.
  • Common -> Select “Allow Patch to be uninstalled”
  • Add the uncompressed Latest msi built earlier, for the latest setup path
  • Advanced -
    i. Generate Patch GUID – No
    ii. Note down the Patch GUID for command line uninstallation
    iii. Include Whole files – Yes
    iv. If this is the first HF for this product line and there is no major upgrade previously set Allow Product codes to differ – No otherwise set to Yes
    v. Include Win9x engine – No
    vi. Include WinNT engine - No
    vii. Minor Update to Target RTM version (MSI 3.1 Required) – Yes. By setting this option to Yes, you can include only the Base MSI under the previous patch section and safely ignore the other msi’s between the Base and the current Patch.
    viii. Msi Engine Version\Schema - Version 3.1 (requires Windows 2000 SP3 or greater)
   2.  Under Previous setups add uncompressed Base MSI
        [Note: Even for successive patches, it is sufficient to include only Base MSI under Previous setups since we have selected Minor Update to Target RTM version (MSI 3.1 Required) to Yes.]

Command Line Switches for MSI and MSP Installations / Uninstallations:
Click here for command line arguments and the silent switches that can be used for msi and msp (un-installable patches).
I will write shortly on few build-time / run-time errors thrown in patch creation process and the steps to resolve the same.

No comments:

Post a Comment