Announcement

Collapse
No announcement yet.

Install Condition from Registry?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Install Condition from Registry?

    Might have missed something obvious here as I'm pretty new to SetupFactory ...

    I'm wondering whether there is a way to skip the install and go straight to running the application, if the current version is already installed. The install I'm building already has the following:
    - a registry setting that records version
    - a registry setting that records appdir

    What I'd like to do is read these registry settings, and if the version matches the current install's version, go ahead and run the .exe in the appdir rather than running the install.

    Hope this makes sense!
    Thanks,


    ------------------
    .jrd

  • #2
    Re: Install Condition from Registry?

    Hi,
    What you should do is create two variables, one that reads in the APP Path, and the other that reads in the version. So lets say that you read the version into a variable called: %CurVer%, the path into %CurPath%, and the newest version was: 4.0.1.2.
    Now what you should do is basically add a Boolean condition to EVERYTHING, to all the files, all the screens, and all your commands. Make the Boolean condition: %CurVer% < 4.0.1.2. Which means that none of the files will be installed, none of the screens will be displayed, and none of the commands will take place unless the user has a version older then 4.0.1.2.
    Then create an execute command, point it to the current executable using the %CurPath% variable, and give it the Boolean condition that: %CurVer% >= 4.0.1.2. Which means that the execute command will not occur unless the users has version 4.0.1.2 or newer.
    That's it, you might have to play around a bit before you can get everything working, but the above is the basic outline.

    mark.
    MSI Factory The Next Generation Intelligent Setup Builder

    Comment


    • #3
      Re: Install Condition from Registry?

      Hi Mark,

      Seems pretty complicated (especially as this install happens to have literally hundreds of files included). I think instead I will make a small app outside of the installer itself that just reads the reg settings and then either launches the app or launches the installer. Thanks for the idea though.

      Originally posted by Mark:
      Hi,
      What you should do is create two variables, one that reads in the APP Path, and the other that reads in the version. So lets say that you read the version into a variable called: %CurVer%, the path into %CurPath%, and the newest version was: 4.0.1.2.
      Now what you should do is basically add a Boolean condition to EVERYTHING, to all the files, all the screens, and all your commands. Make the Boolean condition: %CurVer% < 4.0.1.2. Which means that none of the files will be installed, none of the screens will be displayed, and none of the commands will take place unless the user has a version older then 4.0.1.2.
      Then create an execute command, point it to the current executable using the %CurPath% variable, and give it the Boolean condition that: %CurVer% >= 4.0.1.2. Which means that the execute command will not occur unless the users has version 4.0.1.2 or newer.
      That's it, you might have to play around a bit before you can get everything working, but the above is the basic outline.

      mark.


      ------------------
      .jrd

      Comment

      Working...
      X