VarInit

InstallShield 2016 » InstallScript Language Reference

The VarInit function initializes or reinitializes internal lists used by the VarSave and VarRestore functions. Calling this function effectively clears any information stored by previous VarSave calls and not yet used by subsequent VarRestore functions.

Syntax

VarInit (nType);

Parameters

VarInit Parameters

Parameter

Description

nType

Specifies which information to reset. Pass one of the following predefined constants in this parameter.

Project • These constants apply to InstallScript projects:

VAR_LOGGING—Resets any stored uninstall logging entries.
VAR_CURRENTDIR—Resets any stored current directory entries.
VAR_ALLSUPPORTED—Resets all stored entries.
VAR_HKEYCURRENTROOTKEY—Resets any stored current root key entries.
CURRENTROOTKEY—This constant is obsolete. Use VAR_HKEYCURRENTROOTKEY instead.

Project • This constant applies to Basic MSI, InstallScript, and InstallScript MSI projects:

VAR_SRCTARGETDIR—Resets any stored current entries for TARGETDIR (in InstallScript installations), and INSTALLDIR (in Basic MSI and InstallScript MSI installations), and SRCDIR.

Project • This constant applies to Basic MSI and InstallScript MSI projects:

SRCINSTALLDIR—This constant is obsolete. Use VAR_SRCTARGETDIR instead.

Return Values

VarInit Return Values

Return Value

Description

ISERR_SUCCESS

Indicates that the current values of the system variables were reset.

See Also