![]()
|
InstallShield 12 » InstallScript Language Reference
The Is function retrieves information commonly needed in a script.
Is ( nIsFlag, szIsData );
| Parameter |
Description |
|---|---|
| nIsFlag |
Specifies the type of information to retrieve. Pass one of the following predefined constants in this parameter:
|
| nIsFlag (cont.) |
During a maintenance setup or uninstallation, Is(SETUP_PACKAGE, szIsData) returns TRUE if the original setup was a self-extracting executable (although the maintenance setup or uninstallation runs not from the self-extracting executable but from the copy of Setup.exe in the DISK1TARGET folder). A valid URL string meets the following criteria:
Is(WEB_BASED_SETUP,szIsData) checks whether the current instance of the installation is being run from the Web. For this reason, when the installation is run from Windows' Add/Remove Programs dialog box, Is(WEB_BASED_SETUP,szIsData) always returns FALSE, since in that case the installation is always being run from the local files even if the original installation was run from the Web. |
| szIsData |
Specifies information that is dependent on the constant passed in nIsFlag, as shown below. Note that if the path or filename is enclosed in quotation marks, Is will fail. To ensure that the path or filename is not enclosed in quotation marks, call LongPathToQuote(szIsData, FALSE) before calling Is. The following list provides an explanation of what szIsData should contain when each nIsFlag option is specified:
Path to Setup.ini|Language ID If the path to Setup.ini is not specified, the current installation is used. If the language ID is not specified, SELECTED_LANGUAGE is used. |
| Return Value |
Description |
|---|---|
| TRUE (1) |
Indicates that the answer is true. |
| FALSE (0) |
Indicates that the answer is false. |
| < 0 |
The Is function was unable to answer the question. |
The following predefined values are supported for specifying a particular version of the .NET Framework using DOTNETFRAMEWORKINSTALLED:
For .NET version 1.1 and later (.NET 1.0 does not support language packs), you can also test whether a particular .NET language pack is installed by specifying the appropriate .NET version constant and List of Locale ID (LCID) language code (converted to a string) separated by the caret operator. For example, use the following syntax to test whether the German language pack for .NEt 1.1 is installed:
NumToStr( szLang, ISLANG_GERMAN_STANDARD );
REGDB_KEYPATH_DOTNET_11 ^ szLang;
As documented by Microsoft, .NET 1.1 supports the following LCIDs:
TIP
Since these predefined constants correspond to the registry path under HKEY_LOCAL_MACHINE, you can also specify a registry path directly in szIsData. The function looks for a value named "Install" under the specified registry path. If the value exists and has a value of "1", TRUE is returned. Otherwise, FALSE is returned.
See Also
|
|
copyright contact |