Announcement

Collapse
No announcement yet.

Simple if Statement

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Simple if Statement

    I want to use a variable to let the user select one of two versions of the software they may already have installed before they install the addon.

    If they have App installed the install path will be %ProgramFile%\App

    If they have App Lite installed, the path will be %ProgramFiles%\App Lite

    I set the variable using the radio12 window at the start. The choice is set in the variable %SelectVersion%

    I then added a if statement to set the install [path after they have selected their choice as follows:

    if (%SelectVersion% = App Lite)
    {
    %AppDir% = %ProgramFiles%\App Lite
    }
    else
    {
    %AppDir% = %AppDir%*
    }
    end if

    *as defined in the main setup window

    Why won't this work? I keep getting prompted for and extra "\" and all kinds of other errors.

  • #2
    Re: Simple if Statement

    Basically, what I want is the ability to give the user the option to select a version of his software and then install the update according to the path.

    path a: c:\Program Files\ApplicationX
    path b: c:\Program Files\ApplicationX Lite

    It seems simple but I am having a hard time getting it to work. Help!

    Comment


    • #3
      Re: Simple if Statement

      I would use packages to do that personally.

      Corey Milner
      Creative Director, Indigo Rose Software

      Comment


      • #4
        Re: Simple if Statement

        Thanks. I'll retry that then. I couldn't get it to work even with packages.

        Comment


        • #5
          Re: Simple if Statement

          Not to make your life more difficult, but another idea is if you already know what the apps are, find them yourself in the code and only show a choice if you find both... Assuming you know where to look in the registry, I always like to find the installed product in code then have the user confirm (i.e., Check some registry keys, then show the "This upgrade requires version X of product Y be installed. Could not find version X of prodcut Y."). Fewer checkboxs for users but more work for you... [img]/ubbthreads/images/icons/frown.gif[/img]

          Comment


          • #6
            Re: Simple if Statement

            Thanks for the help, all.

            I ended up using two radio buttons and had them create a variable called %RadioSelection%. When a radio button is selected the path for the chosen app is written into the variable. Then I call that variable upon pressing the Next button. It works flawlessly. I even have it setup to shutdown the program and restart it after the files have been updated.

            SF6 kicks butt! So far, SF6 is the best setup utility I have seen on the market.

            Comment

            Working...
            X