Page 1 of 4 123 ... LastLast
Results 1 to 5 of 17

Thread: How to Find Installation Folder?

  1. #1
    Join Date
    Oct 2007
    Posts
    67

    How to Find Installation Folder?

    Hi there..

    I have a created a Install Shield project that performs a major upgrade. The older version of the product being upgraded may have been installed into a folder that differs from new version of the our product.

    The upgrade is working well but a need has arisen to allow the user to select files to be backed up prior to the upgrade removing them from the original location.

    How can I via script retrieve the folder path (installation folder) of the product being upgraded?

    +++++++++++++
    Example:

    Lets say that version 1 of the product was installed in C:\Program Files\Version1

    And version 2 of the product will be installed in C:\Program Files\Version2

    Now when I upgrade from Version1 to Version2, I need to determine that when version1 was installed, the user installed it into C:\Program Files\Version1

    InstallShield seems to know - how can I find this information - I assume the Registry? But my searches have not provided any meaningful information.

    +++++++++++++

    Each version of our product has within InstallShield:

    A unique version number
    A unique product code
    A unique package code
    Common Upgrade code

    I hope someone can shed some light on this for me.

    Thanks

    Brent

  2. #2
    Join Date
    Oct 2001
    Location
    Here and there
    Posts
    16,243
    Given the older product's ProductCode value, you can call MsiGetProductInfo with INSTALLPROPERTY_INSTALLLOCATION (or Installer.ProductInfo with "InstallLocation") to get the old installation directory.

  3. #3
    Join Date
    Oct 2007
    Posts
    67
    How will I know what the colder product was? With my project being a major upgrade the product code changes from release to release and the use may be jumping versions when upgrading?

    Example

    Version 1 has a product code of a
    Version 2 has a product code of b
    Version 3 has a product code of c

    All 3 share a common upgrade code.

    If a user starts with version 1 and decides to proceed to version 3 without passing through version 2? How would I code IS to handle this situation?

    Many Thanks

    Brent

  4. #4
    Join Date
    Oct 2001
    Location
    Here and there
    Posts
    16,243
    The "action property" in the Upgrade table (usu. ISACTIONPROP1) will be semicolon-separated list of ProductCode values for products being removed, so perhaps use that?

  5. #5
    Join Date
    Oct 2007
    Posts
    67
    Hi...

    I checked in the Upgrade table and only the upgrade code is shown. I don't see any product codes listed there?

    Thanks

    Brent

Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •