Announcement

Collapse
No announcement yet.

Conditional Install

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

  • Conditional Install

    Consider the following scenario:

    As part of the installation, a user is required to enter a serial number. Based on
    that serial number, the user is entitled to receive certain files.

    Is it possible to use the serial number (assigned to a variable) as a condition for installing specific files?

    In other words:
    Once the user has entered the serial number can I test for what number has been entered and then assign a value to a variable? Once I assign a value to a variable, can I then use that variable to determine whether to install a file or not?

    Thanks.

  • #2
    Re: Conditional Install

    Hi,
    Sorry for the late response, but yes doing this is possible. Simply go to the FILES PROPERTIES, CONDITIONS TAB and there create a BOOLEAN CONTITION, something like:
    %Serial% = mypin-1234
    That way that specific file, or group of files will only be installed if it meets that condition; if that serial number has been entered.
    Note: On the SERIAL NUMBER screen properties, SERIAL NUMBER section there is a variable field, put your variable in there and it will be set to the entered serial number.

    mark.
    MSI Factory The Next Generation Intelligent Setup Builder

    Comment


    • #3
      Re: Conditional Install

      Originally posted by Mark:
      Sorry for the late response, but yes doing this is possible. Simply go to the FILES PROPERTIES, CONDITIONS TAB and there create a BOOLEAN CONTITION, something like:
      %Serial% = mypin-1234

      Problem: since more than 1 serial number may require the installation of a particular file, setting multiple conditions as you suggest above for the same file means that the file will never be installed. Files are not to be installed exclusively. A particular file may be installed for one or more users or all users or none. In this case setting a condition as suggested above will not work. Is there no way to simply include come kind of "IF" construct?

      Also, the same is true for a destination directory. Depending on the type of install, a file could be installed on a user's hard disk, or a network drive, or not installed at all. You see, in the case of a network install, you may have an application directory to install regular programs while data files may be installed in the same directory or to directories on network drives. Is SUF sufficiently flexible to handle this case?

      thanks Mark.

      Comment


      • #4
        Re: Conditional Install

        Hi,
        With the file problem there are two things that I would suggest:
        1) Try using "not equal to" conditions instead of "equal to" in certain cases. You if you had four serial number: 1,2,3,4 and you wanted a file to be installed if either serial number 2 or 3 was chosen, then you could set this condition to be:
        %serial% <> 1
        %serial% <> 4
        Now I'm not really sure how many different serial numbers you are using, or how many different conditions that you need, although I think that doing this might help you. Sorry there is no way to include an IF statement.

        2) You could try using packages, please see the user's guide under: WORKING WITH PACKAGES. There is a lot of useful information contained within this section, and I think by playing around with packages you will be able to get the functionality that you want.

        As far as changing the install directory based upon a specific serial number what you would have to do is create as many SELECT INSTALL FOLDER screens as you have different install paths. Then set the default directory to the install path that you want, and then set the Boolean Condition to something like %serial% = 123. So that that screen will only be shown with the correct serial number.

        I hope that this helps.

        mark.
        MSI Factory The Next Generation Intelligent Setup Builder

        Comment


        • #5
          Re: Conditional Install

          Dear JAT,
          Interesting post... I have used Setup Factory to implement a fairly complex (from my point of view) install process which is tackling problems seemingly similar to yours. Without knowing exactly what your doing, I think you are better off looking more closely into Mark's last suggestion.
          I have a piece of software whcih supports integration between two programs and the user could be using a stand-alone computer or running a network. I am controlling the number of users, making determinations as to is this a stand-alone or network system, and selectively installing files either to the server and or the workstation. I handle this by using variables for file and condition searches, three packages (Server Install, Workstation Install, and Stand-alone Install which includes both basically),and then I have some conditional screens. I also use some Serial numbers, Reg files and other misc stuff, but the key is the three things mentioned previously.
          One of the main things I have to do to make it work is require the user first select the location of the Master App... either on a Server mapped Drive or a local drive and then another selection screen asks them to select the location of their personal (user) files. By the time they select the kind of install they want to do, between all the variables from searches and screens I have set the installer can perform very specific tasks while identifying the difference between Single user, multiple user, and Server installation issues.
          While I don't really know what your challenge (the big picture) is, I can tell you I started by sanctioning packages first. Then I sussed out variables I might implement to qualify certain criteria in the screens. As I built it, selection and ordering of the screens (basically) started to bring it all together for me. Importantly, having screen qualifications enhanced the flexibility all the way around.... meaning conditional appearance of certain screens based on variables both from variable searches and from variables set by screens as they appear and selections are made.
          I know this is very general, but maybe it can help a little... I am sure you can accomplish what you want based on the problem you identified.

          Good Luck,
          Rick

          Comment

          Working...
          X