SdFinishReboot

InstallShield 2015 » InstallScript Language Reference

Project: This information applies to the following project types:

InstallScript
InstallScript MSI

The SdFinishReboot function at the end of your installation announces that the installation is complete and gives the end user the option to restart the system. Restarting the system allows changes to Autoexec.bat, Config.sys, and some .ini files to take effect.

The SdFinishReboot dialog displays up to two messages in static text fields. Set the value of these fields with the parameters szMsg1 and szMsg2. To insert the product name into the messages, use the place holder %P in the strings passed in szMsg1 and szMsg2.

Syntax

SdFinishReboot ( szTitle, szMsg1, nDefOption, szMsg2, nReserved );

Parameters

SdFinishReboot Parameters

Parameter

Description

szTitle

Specifies the title of the dialog. To display the default title (“Setup Complete”), pass a null string (“”) in this parameter.

szMsg1

Specifies the text to display at the top of the dialog, informing the user about the end of the installation. To display the default instructions for this dialog, pass a null string (“”) in this parameter.

nDefOption

Specifies a default radio button option selection. Pass one of the following predefined constants in this parameter:

SYS_BOOTMACHINE—Reboot the computer when the setup is finished.
0—Do not reboot the computer.

szMsg2

Specifies the text to display at the bottom of the dialog, giving the user information about what to do. To display the default instructions, pass a null string (“”).

nReserved

Pass zero in this parameter. No other value is allowed.

Return Values

SdFinishReboot Return Values

Return Value

Description

WILL_REBOOT

Indicates that the user chose to reboot the system.

NEXT (1)

Indicates that the user chose not to reboot the system or restart Windows.

< 0

Indicates that the user chose to either reboot the system or restart Windows, but the reboot or restart failed.

Note: Because SdFinishReboot announces the end of the installation, the Back button is disabled.

Additional Information

To view an example of this or other dialogs for your installation, use the Dialog Sampler. In InstallShield, on the Tools menu, point to InstallScript, then click Standard Dialog Sampler or Skinned Dialog Sampler.
The installation makes every attempt not to reboot the computer when other instances of the installation are running. Because of this, you must ensure that all other instances of the installation are shut down before allowing SdFinishReboot to restart Windows or the system. Additionally, your message to the end user should request that if they plan to restart the system later, they should ensure that all other applications are shut down first.
The installation automatically ensures that locked .dll and .exe files are updated the next time that the system starts.

See Also