Announcement

Collapse
No announcement yet.

Product Selection

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

  • Product Selection

    I hope I describe this properly, I want to create an installer where the end user can select which product to install. I would like to display a list (7 products) and let the end user select which one he wants to install , returning to the "main menu"

  • #2
    I would use a Radio Buttons screen for this. Create packages for the files for each product, but do not show a Select Packages screen. Instead, make the selection via code, based on the result from the Radio Buttons. Unless I misunderstood what you were asking...

    Ulrich

    Comment


    • #3
      Ulrich, thanks for the assist, my radio button screen has been created.
      Conceptually, would the following work?:


      -- These actions are performed before the screen is shown.
      button1 = DlgRadioButton.GetProperties(CTRL_RADIO_BUTTON_01) ;
      button2 = DlgRadioButton.GetProperties(CTRL_RADIO_BUTTON_02) ;
      button3 = DlgRadioButton.GetProperties(CTRL_RADIO_BUTTON_03) ;

      if (button1) then
      button1 = File.Run(SessionVar.Expand("%AppFolder%\\setup_pro duct1.exe"), "", "", SW_SHOWNORMAL, false);
      end;

      if (button2) then
      button1 = File.Run(SessionVar.Expand("%AppFolder%\\setup_pro duct2.exe"), "", "", SW_SHOWNORMAL, false);
      end;

      if (button3) then
      button1 = File.Run(SessionVar.Expand("%AppFolder%\\setup_pro duct3.exe"), "", "", SW_SHOWNORMAL, false);
      end;

      Comment


      • #4
        The code is in the On Preload event script ("These actions are performed before the screen is shown"), so this will never work. You want to evaluate which selection was done upon leaving the screen, in the On Next event script. Also, your script to check which one was selected by the user is incorrect, please see the sample code provided in the product documentation as a starting point. Help > Program Reference > Screen Types > Radio Buttons > Examples.
        Finally, instead of running a program, you will want to set a variable and/or set the corresponding package for installation.

        Ulrich

        Comment

        Working...
        X