MediaGetDataEx

InstallShield 2022 » InstallScript Language Reference

Project:This information applies to InstallScript projects.

The MediaGetDataEx function retrieves information about a file media library, including media information that is stored in the project’s string entries.

Syntax

MediaGetDataEx ( szMediaSource, nInfo, nvResult, svResult, bCheckStringTable );

Parameters

MediaGetDataEx Parameters

Parameter

Description

szMediaSource

Specifies the name of the file media library whose information is to be retrieved; typically, the value of this argument is the system variable MEDIA.

nInfo

Specifies the type of information to retrieve. Pass one of the following predefined constants in this parameter:

MEDIA_FIELD_ADDREMOVE_NOMODIFY—Retrieves the setting that you specified in the Disable Change Button setting in the General Information view. The value is returned in nvResult; 0 corresponds to No and 1 corresponds to Yes.
MEDIA_FIELD_ADDREMOVE_NOREMOVE—Retrieves the setting that you specified in the Disable Remove Button setting in the General Information view. The value is returned in nvResult; 0 corresponds to No and 1 corresponds to Yes.
MEDIA_FIELD_COMPANY_NAME—Retrieves the company name that you specified in the General Information view. The company name is returned in svResult.
MEDIA_FIELD_MEDIA_FLAGS—Retrieves the format of the specified file media library. The number returned in nvResult includes any applicable values from among the following bit flags:

MEDIA_FLAG_FORMAT_DIFFERENTIAL: Indicates a differential file media library.

MEDIA_FLAG_UPDATEMODE_SUPPORTED: Indicates an update enabled file media library. This flag is always set.

MEDIA_FIELD_PREVIOUS_VERSIONS—Retrieves the version information that you specified in the Supported Version(s) property of the Releases view or in the Update panel in the Release Wizard. The version information is returned in svResult.
MEDIA_FIELD_PRODUCT_COMMENTS—Retrieves the comments that you specified in the ARP Comments setting in the General Information view. The value is returned in svResult.
MEDIA_FIELD_PRODUCT_EXE—Retrieves the executable name that you specified in the General Information view. The executable name is returned in svResult.

nInfo (cont.)

MEDIA_FIELD_PRODUCT_ICON—Retrieves the display icon that you specified in the Display Icon setting in the General Information view. The value is returned in svResult.
MEDIA_FIELD_PRODUCT_NAME—Retrieves the product name that you specified in the General Information view. The product name is returned in svResult.
MEDIA_FIELD_PRODUCT_README—Retrieves the readme file that you specified in the Read Me setting in the General Information view. The value is returned in svResult.
MEDIA_FIELD_PRODUCT_SUPPORT_CONTACT—Retrieves the support contact that you specified in the Support Contact setting in the General Information view. The value is returned in svResult.
MEDIA_FIELD_PRODUCT_SUPPORT_PHONE—Retrieves the support phone number that you specified in the Support Phone Number setting in the General Information view. The value is returned in svResult.
MEDIA_FIELD_PRODUCT_SUPPORT_URL—Retrieves the support URL that you specified in the Support URL setting in the General Information view. The value is returned in svResult.
MEDIA_FIELD_PRODUCT_UPDATE_URL—Retrieves the product update URL that you specified in the Product Update URL setting in the General Information view. The value is returned in svResult.
MEDIA_FIELD_PRODUCT_URL—Retrieves the publisher/product URL that you specified in the Publisher/Product URL setting in the General Information view. The value is returned in svResult.
MEDIA_FIELD_PRODUCT_VERSION—Retrieves the version information that you specified in the General Information view. The version information is returned in svResult.
MEDIA_FIELD_TARGETDIR—Retrieves the value of TARGETDIR that you specified in the General Information view.

bCheckStringTable

Specifies whether svResult returns the string that you entered in InstallShield (FALSE) or, if the string that you entered in InstallShield is a string identifier, the string value that is associated with that identifier (TRUE). If bCheckStringTable is TRUE but the string that you entered in InstallShield is not a string identifier, svResult returns the string that you entered in InstallShield.

Return Values

MediaGetDataEx Return Values

Return Value

Description

0

MediaGetData successfully retrieved the requested information.

< 0

MediaGetData failed to retrieve the requested information.