+ Reply to Thread
Results 1 to 4 of 4

Thread: How to detect the previous version of one installer from other one

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default How to detect the previous version of one installer from other one

    Hi,

    I have one child installer which gets installed as part of its parent installer. Some time the child installer can be installed alone. At that time how to verify it from parent installer whether the child is installed or not?. If it is I need to uninstall it and reinstall them. How to do it?

    Is 'Detect previous version' function useful?

    Note : It is not registered in windows registry. But I know the GUID of both.

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: How to detect the previous version of one installer from other one

    Hello,

    to comply with the Windows Install/Uninstall requirements, you have to "register" the installed application in the Add/Remove (Programs and Features) control panel. This will write the Product GUID along with product specific information to the appropriate places (so it can be uninstalled later via Add/Remove). If you don't use the Add/Remove Programs feature then you can't detect the installed application because it is not registered with Windows.

    I assume that you are using the above mentioned feature (it is enabled by default). The "Detect Previous Version..." function lets you detect the path of a previously distributed version of your product. If the function succeeds, the %_SB_ERRORCODE% return value is nonzero (means: the application is already installed). The variable used in this script function contains the path to the previous version. %_SB_TMP% contains the uninstall string (if available). %_SB_RETURNEX% contains the installed version number (if available).

    You can simply use the %_SB_TMP% variable in "Run Command Line..." to uninstall the previously installed version.

    Does this help?

    Friedrich

  3. #3

    Default Re: How to detect the previous version of one installer from other one

    Thanks!.
    Yes I have done as you said. That is, my application is getting added in Add/Remove program. I have "Detect Previous version" function implemented in my child installer for its GUID. and It detects properly If it is already installed.
    Now I want to implement the samething in my parent installer where I need to detect the child application whether it is already installed or not?.

    In that, can I detect GUID of child application from parent installer?

    Regards
    A Vijayasaravanan

  4. #4
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: How to detect the previous version of one installer from other one

    Hello,

    If the "child" install has its own Product GUID, then yes. You can use the same method to detect it. If it does not have its own Product GUID then Windows does not know nothing about it. Then the only way to "detect" it is to see if "child" specific files are already there with a specific version resource (because you said you do not write anything to the Registry). You can use "If File/Folder Exists..." and/or "Get File Info (Version Resource)...".

    BTW, if you have access to the "child" install sources and it does not have its own Product GUID, just let the "child" install write a simple registry footstep to the "main" installs Product GUID registry key (e.g. AddOnVersion=1.2.3.4) and you can detect it without an unique GUID.

    Friedrich

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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