SdLicense Example

InstallShield 2014 » InstallScript Language Reference

Project: This information applies to the following project types:

InstallScript
InstallScript MSI

/*--------------------------------------------------------------*\

*

* InstallShield Example Script

*

* Demonstrates the SdLicense function.

*

* This script calls SdLicense to display a license agreement

* and prompt the user to accept or reject that agreement.

*

* Note: The license agreement is read from a text file that

*       is stored at the location specified by the constant

*       LICENSE_PATH.  Before running this script, set that

*       constant so that it references an existing text file

*       in the Support Files/Billboards view.

*

\*--------------------------------------------------------------*/

 

#define LICENSE_PATH SUPPORTDIR ^ "License.txt"

#define TITLE "SdLicense Example"

 

#include "Ifx.h"

 

function OnBegin()

    STRING szMsg, szQuestion;

begin

 

    // Disable the Back button in setup dialogs.

    Disable (BACKBUTTON);

    

    // Set up the variables to pass as parameters to SdLicense.

    szMsg      = "Please read the following license agreement. Use " +

                 "the scroll bar to view\nthe rest of this agreement.";

    szQuestion = "Select Yes to accept the agreement.\n" +

                 "Select No to cancel the setup.";

    

    // Display the SdLicense dialog.

    if (SdLicense (TITLE, szMsg, szQuestion, LICENSE_PATH) = YES) then

        MessageBox ("Continue with the installation.", INFORMATION);

    endif;

 

end;