Handling User Input

InstallShield 2022 » InstallScript Project Tutorial

In your InstallScript code, the event handler functions that contain the dialog functions displayed at run time are:

OnFirstUIBefore, which contains the dialogs to be displayed before data transfer for a first-time installation.
OnFirstUIAfter, which contains the dialogs to be displayed after data transfer for a first-time installation.
OnMaintUIBefore, which contains the dialogs to be displayed before data transfer for a maintenance-mode installation.
OnMaintUIAfter, which contains the dialogs to be displayed after data transfer for a maintenance-mode installation.

Note:The OnMaintUIBefore and OnMaintUIAfter event handler functions are not called if the project’s Maintenance Experience property is set to "No uninstall or maintenance".

A default InstallScript project created with the Project Assistant defines the OnFirstUIBefore event handler function, which defines the user interface for a first-time installation. OnFirstUIBefore calls dialog functions to display the dialogs that you specified in the Project Assistant’s Installation Interview page. For example, the following code displays a dialog that prompts the end user to enter a user name and company name:

szMsg = "";

szTitle = "";

nResult = SdRegisterUser( szTitle, szMsg, szName, szCompany );

The end user’s user name and company name are returned in the last two variables, which you can then use in any way you want, for example, to create a registry key or check against information you have stored in a file.

Continue