Modify SetupTypeDlg - Advanced Installer Community
kondriks
Posts: 36
Joined: Mon Nov 17, 2014 3:49 pm

Modify SetupTypeDlg

I want to replace in dialogue "SetupTypeDlg" standard buttons with group of switches ("Typycal" and "Complete" installation).
And for the Next button wrote a VBS script:

Code: Select all

Function SetInstallType()
  If ("1" = Session.Property("RADIOBUTTONGROUP_1_PROP_1"))  Then
    Session.Property("InstallMode") = Session.Property("InstallModeComplete")
    Session.Property("INSTALLLEVEL") = "1000"
  Else
    Session.Property("InstallMode") = Session.Property("InstallModeTypical")
    Session.Property("INSTALLLEVEL") = "3"
  End If
End  Function
But in an installation time fulfills a code for installation "Typical".
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Modify SetupTypeDlg

Hello,

Please keep in mind that you cannot achieve what you want by using a custom action. This is because instead of setting the "INSTALLLEVEL" property (which you do from your custom action) , you will have to call the "SetInstallLevel" control event (this cannot be done within a custom action).

However, you can implement the desired behavior quite easily only by using our "Dialog Editor" feature. All you have to do is to associate your radio button group combo box with the "InstallMode" property and use for its radio buttons the following values: Typical and Complete (in the "Value" field from "Properties" right pane). Then, you should only add the following events, in the "Published Events" tab, on your [Next>] button:
  • Event: Set install level value
    Argument: 3
    Condition: InstallMode = "Typical"

    Event: Set install level value
    Argument: 1000
    Condition: InstallMode = "Complete"

    Event: Display a specific dialog
    Argument: VerifyReadyDlg
    Condition:
Also, I've attached a sample created with version 11.7.1 of AI which implements a similar behavior.
sample.zip
(4.11 KiB) Downloaded 426 times
As another solution, you can use our "Graphite" theme whose "SetupTypeDlg" dialog implements by default such functionality.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kondriks
Posts: 36
Joined: Mon Nov 17, 2014 3:49 pm

Re: Modify SetupTypeDlg

Thanks, Daniel.
And how to do this for silent installation?
For example, if the user is an administrator, then perform a full install, and if it is not an administrator - a typical installation.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Modify SetupTypeDlg

Hello,

When performing a silent install you can set the ADDLOCAL property in order to manage which features will be installed.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”