Disable

InstallShield 2012 Spring » InstallScript Language Reference

The Disable function deactivates the user interface object or setup feature specified by the parameter nConstant.

If your script calls the Disable function to disable the Next or Back button, that button is disabled in all dialogs displayed after that function call. To re-enable the Next or Back button, you must call Enable with the corresponding constant.

Syntax

Disable ( nConstant );

Parameters

Disable Parameters

Parameter

Description

nConstant

Specifies the user interface object or operational feature to disable.

Pass one of the following predefined constants in this parameter:

BACKBUTTON—Disables (grays out) the Back button that is displayed in some built-in dialogs. The Back button is enabled by default.
BACKGROUND—Disables and hides the installation's main background window. Note that this parameter has no effect when the installation is in full-screen mode.
BILLBOARD—Suppresses the display of billboards during an installation.
CANCELBUTTON—Disables (grays out) the Cancel button that is displayed in some built-in dialogs.
DIALOGCACHE—Disables the dialog cache mechanism. For more information about dialog caching, see Enable.

Note: DIALOGCACHE has no effect on dialogs that do not have a Next or Back button.

HOURGLASS—Causes the mouse cursor to change from the "Busy" cursor (an hourglass by default), to a normal cursor (a pointer by default).

nConstant (cont.)

LOGGING—Disables the logging of uninstallation information so that no information is recorded in the uninstallation log file.

Note that logging is enabled automatically by default. If you need to disable logging, it is recommended that you do so by calling Disable with the LOGGING constant immediately before performing operations that should not be logged for uninstallation. Then you can re-enable logging by calling Enable with the LOGGING constant.

For more information about logging, see InstallScript Functions that Are Logged for Uninstallation.

Tip: To prevent changes that are made by a component from being undone during uninstallation, select No for the Uninstall setting of a component in an InstallScript project, or select Yes for the Permanent setting of a component in an InstallScript MSI project.

NEXTBUTTON—Disables (grays out) the Next button that is displayed in some built-in InstallScript dialogs. On most dialogs, the Next button is enabled by default.

Note: Calling Disable with the NEXTBUTTON constant has no effect on the SdCustomerInformation, SdCustomerInformationEx, SdRegisterUser, or SdRegisterUserEx dialogs since they enable and disable the Next button internally.

PCRESTORE—Disables System Restore compatibility, which is enabled by default.
REGISTRYFUNCTIONS_USETEXTSUBS—Disables text substitutions in strings that are passed to registry functions; this is enabled by default. Use this option when working with registry function strings that contain opening angle brackets (<) and closing angle brackets (>) but that should not be interpreted as text substitutions.
SELFREGISTERBATCH—Disables the "batch method" for registering files copied with XCopyFile and the SELFREGISTER constant. The batch method is enabled by default.

When the batch method is disabled, files are registered immediately when copied with XCopyFile and the SELFREGISTER constant. If the batch method is enabled, registration is postponed until data transfer takes place.

nConstant (cont.)

SERVICE_DIFX_32—Disables DIFx support for 32-bit platforms.
SERVICE_DIFX_AMD64—Disables DIFx support for AMD 64-bit platforms.
SERVICE_DIFX_IA64—Disables DIFx support for Itanium 64-bit platforms.
SERVICE_ISFONTREG—Disables global font registration. For details, see Installing Fonts Through InstallScript and InstallScript Object Projects. Global font registration is enabled by default; once it is disabled, it cannot be re-enabled from the script.
STATUS—Disables and hides the progress indicator (status bar).
STATUSBBRD—Disables and hides the progress dialog that includes a billboard.
STATUSDLG—Disables and hides the dialog style progress indicator (status bar).
STATUSEX—Disables the display of the default Setup Status dialog.
STATUSOLD—Disables and hides the old style progress indicator (status bar).
UPDATE_SERVICE_INSTALL—This constant is obsolete.
USE_LOADED_SKIN—Intended for use with custom dialogs that will not work with dialog skins (for example, dialogs that are not the standard size); not recommended for use with built-in dialogs. Disables the use of the skin that you specified in the Specify Skin setting on the Build tab for the release in the Releases view. (If you selected the <Do not use any skin> option in that setting, this constant has no effect.) Disabling of the skin applies only to dialogs that are displayed after you call Disable(USE_LOADED_SKIN); in your InstallScript code. To disable skin use for a custom dialog, you must call Disable(USE_LOADED_SKIN); before calling WaitOnDialog. To re-enable skin use, call Enable(USE_LOADED_SKIN); in your script.

Project: The USE_LOADED_SKIN constant is applicable to InstallScript projects.

WOW64FSREDIRECTION—Disables 64-bit Windows file system redirection. You may need to do this before installing files to the WINSYSDIR64 destination. To learn more, see Targeting 64-Bit Operating Systems with InstallScript Installations.

Return Values

Disable Return Values

Return Value

Description

0

Indicates that the function successfully disabled the user interface object or setup feature specified by the parameter nConstant.

< 0

Indicates that the function was unable to disable the user interface object or setup feature specified by the parameter nConstant.

See Also