7 component functions of the INSTALLSHIELD internal library function

zhaozj2021-02-17  36

7 component functions of the INSTALLSHIELD internal library function

The following functions allow you to control file media, create and process component groups created by scripts:

ComponentAddItem

Add a new component to the component group created by the script.

ComponentComparesizeRequired

Determine if there is enough free disk space to the selected component.

ComponentDialog

Rendering a dialog, allowing the end user to select the component and specify a target location.

ComponENTERROR

When a component function fails, the additional error message is returned.

ComponentfilterLanguage

Activate and disable language-based screening (program).

Componentfilteros

Activate or disable screening based on operating systems.

ComponentgetData

Retrieve information about a component.

ComponentgetItemsize

Determine the size of a specified component.

Componentgettotalcost

Determine the total space required to install and uninstall the components already specified.

ComponentInitialize

Prepare file media libraries for access.

Componentisitemselected

Determine if the specified component has been selected by the end user.

ComponentlistItems

Create a list of components in a file media library or a script created.

ComponentmoveData

Transferring and decompression of files associated with selected components in the file media library.

ComponentreInstall

Configure the installation so that the next file transfer specified for the last installation of the runtime.

Componentremoveall

Configure the installation to uninstall the next to the COMPONENTTRANSFERDATA.

ComponentSelectItem

Select or undo the selected component.

ComponentSetData

Set properties and data for the specified component.

ComponentSetTarget

Specify a user-defined variable, place it in the domain of a component.

ComponentTransferData

Perform the installation and uninstall that has been specified.

ComponentSetuptyPEENUM

Enumerate the type of installation associated with the specified file media library.

ComponentSetuptypegetdata

Retrieve and a specified data associated with the installation type created in the InstallShield IDE.

ComponentSetupTypeset

Select all components associated with the specified installation type.

ComponentTotalsize

Calculate the total size of the selected components and sub-components in bytes.

ComponentValidate

Confirm the password of the entire file media library or in the file library media.

SDSETUPTYPE

Display a dialog box allows the end user to choose three standard installation types: one of the typical, concise, or customizations.

SDSETUPTYPEEX

Display a dialog box allows the end user to select standard and custom installation types.

7.1 ComponentAdditem

Syntax: ComponentAddItem (Szcomponent, NDataSize, bselected);

Description: The ComponentAddItem function adds a component to a component group created by a script. It will be created if a script created by SZComponentSet does not exist. To add a component to a given script to create a component group, you must call ComponentAddItem. You can create multiple scripts to create a component group, each with a unique name (parameter szcomponentset).

To display a selectable single-level component, use ComponentDialog, SDComponentDialog, or SDComponentDialogadv. Use sdcomponentdialog2 or r sdcomponentmult to display components and their sub parts. This function cannot be used to file media libraries.

parameter:

SZComponentset

Specifies the name of the component group to be added to the script to add. If the script creates a component group does not exist, the ComponentAddItem will create it.

Szcomponent

Specifies the component name to be added. Don't use an empty string ("").

Below is information about components and sub-parts specified in the function call:

(Refers to components and sub parts in function calls)

Components are general terms involving a set of file groups and / or sub-components. A sub-component is just a component. It is located under other components, which is similar to the relationship between the folder and subfolders.

"Top-level assembly" is the highest layer component in the hierarchical structure. The top-level assembly is never referenced as a sub-component.

Some InstallShield component functions require you to point to a single component, while others are required to point to multiple components.

To point to a single component, the name of this component is used. In order to point to a sub-component, use a path-form expression, where the name of each component of the assembly is separated by a double reverse slope in the hierarchical structure. For example, use the sub-component teaching under top component help files, use the following expressions in your script.

Szcomponent = "Help files // tutorials";

For the submissions CBT under teaching, use the following expressions:

Szcomponent = "Help files // tutorials // CBT";

Some components and installation type dialog functions, such as SDcomponentMult, display multiple components and their sub parts. In these cases, you can point to multiple components, as long as the components are specified in the hierarchical structure. If the component is a top-level component, use an empty string ("") to reference them.

For example, if you pass an empty string to the SDComponEntMult function, you will display all top components in your file media library or all top components in the component group created in your file media, depend on the value of system variable Media. . All sub parts will be displayed in the SubComponents window.

On the other hand, if you pass a single top component (such as the help file in the above example) to the SDComponEntMult function, it will display its sub-parts (such as above, in the teaching layer) in the Components window and display it in the Subcomponents window. The next lower layer of sub-components (such as above, in the CBT layer).

NDataSize

Specify the size of the data represented by the byte number. If the component is a file sequence, this parameter specifies the total non-compressed size of all files.

Bselacted

Specify the default selection settings for the component. One of the following predefined constants in this parameter location:

TRUE: Indicates that the component is default. If TRUE is passed to a sub-component, its father component is undo selected, although TRUE is passed to the parameter bselect, the sub-component will also be undo selected.

FALSE: Indicates that the component default is to undo the selected.

When the user selects a component or sub-component displayed in the dialog, the default selection setting is cleared. If the user cancels the selected component, all its sub parts will be undo. This component will be undo selected if the user revokes all the sub parts of one component.

return value:

0: ComponentAdditem successfully adds the data item to the component or sub-part.

<0: ComponentAdditem failed to add data items to components or sub-parts. Call ComponEnTerror to see additional information. annotation:

• The component name must not contain these characters, which are illegal file name characters under the resource manager handler; including the following characters: / / ·? "<> |. Trying to create a component name containing one or more of these characters Causes the ComponentAddItem failed.

· You can use ComponentAddItem and scripts to allow users to select from options other than file media component options.

· Start with COMPONENTADDITEM, create a component group that contains the options you need to create.

Then display those options for selecting options by calling SDASKOptions or SDASKOptionsList, their parameter szcomponent passes the name of the component group created by the script. Finally, determine the selected option by calling the ComponentisItemSelected.

7.2 ComponentCompareSizeRequired

Syntax: ComponentCompareSizeRequired (Szmedialibrary, SvTarget, NVSIZE);

Description: The ComponentCompareSizeRequired function determines if the target folder is available to the selected component enough free space, which is specified by Szmedialibrary (must be a file media library). If the target folder does not have enough free space, return a fully qualified folder name by the parameter svtarget, and returns the desired free space size by the parameter nvsize.

Note that the parameter SVTARGET is only used to return a folder name. You cannot use this parameter to specify a target folder. ComponentComPareSizeRequired Check the drive of the target folder, the destination folder is specified on the property table for each component. If SZMedialibrary is a file media library, it has components to be installed on the general application destination folder, you must assign the target path to Targetdir before calling ComponentCompareSizeRequired. You can get a target path from an end user by calling the AskDestPath or a component dialog.

If your installer specifies a target folder for a component in a file in a file, it must be used to check with ComponentSetTarget before checking the idle space with ComponentCompareSizeRequired.

This function cannot use the component group created by the script.

parameter:

SZMedialibrary

Specifies the media name of the file media library, which is compared to the total size of the components included in the library. Compare the idle space on the target drive. If this parameter contains a name of the component group created by a script, the function will fail.

svtarget

If there is enough valid idle space on the target drive, a empty string ("") is returned. If there is not enough free space on the target drive, return the target path.

NVSIZE

If there is enough effective free space on the target drive, it returns 0. If there is not enough free space on the target drive, return the required size (number of bytes).

return value:

0: ComponentCompareSizeRequired success.

<0: ComponentCompareSizeRequired failed. Call ComponEnTerror to see additional information.

7.3 ComponentDialog

See 4.6

7.4 ComponENTERROR

Syntax: ComponEnTerror (Svcomponentsource, SVComponent, svfilegroup, svfile, nverror);

Description: The ComponEnTerror function gets an auxiliary error message when a component function returns less than 0. The following code segments show a typical implementation: NRESULT = ComponentTransferData (Media);

IF (NResult <0) THEN

ComponENTERROR (Svcomponentsource, SVComponent, svfilegroup, svfile, nverror);

Sprintfbox (Information, "ComponentTransferData Error Information",

"ComponentTransferData Had The Following Error: / N / N"

"Media Name:% s / ncomponent:% s / nfile group:% s / n"

"File:% S / NERROR NUMBER:% LD"

SVComponents, SVComponent, SvfileGroup, svfile, nveror;

Endif;

The ComponEnTerror function must be called only when the return value of another component function is less than 0. If another component function is not returned to a value of less than 0, the ComponEnTerror function is called, the invalid error code may be returned.

When the following functions are called, the ComponEnTerror does not return auxiliary information about the error:

ComponentSetuptyPEENUM

ComponentSetupTypeset

parameter:

SVComponentsource

Returns the media name of the component group created with a file media library or script that is specified by NVEROR.

SVComponent

Returns the component name associated with the error specified by NVEROR.

svfilegroup

Returns the file group name related to the error specified by NVEROR.

svfile

Returns the file name associated with the error specified by NVEROR.

Nveror

Returns a code that identifies the type of error that occurs when you previously call a component-related function. These errors are described as follows:

The following table describes the error code returned by ComponEnTerror. Note You must rebuild the project after correcting the mistake involving the media.

Code description

-101 cannot add components. ComponentAddItem cannot add a component group to the script created.

-102 The components specified in -102 already exist. ComponentAdditem is called twice with the same media name and component name.

-104 The specified component name is not valid. The value passed to the second parameter of the ComponentInitialize is not valid.

-105 The specified component cannot be found on the media. Trying to access a component that does not exist on the specified medium. This error occurs when a component function is called without correctly specifying a component name. The specified component name must be and displayed in the component pane or in the same way to the COMPONENTADDITEM. case sensitive.

-106 cannot decompress a file. An internal error has occurred. Technical support, please contact:

http://support.installshield.com/contact/req_sup.asp.

-107 In the ComponentMoveData call, an invalid disk ID is specified. ComponentMoveData has been called to transfer files and have not been reinitialized. To reinitialize ComponentMoveData, call this function with the first parameter as an empty string.

-108 disk space overflow. The target disk or directory does not have enough free space; because Targetdir is invalid, disk space cannot be determined; or the folder created by a component's script has not been set yet.

-109 Enterdisk function call failed. An internal error occurred. -112 cannot find the specified file. To determine which file is lost, check the value of the parameter svfile returned by ComponEnTerror.

-113 The specified file is read-only and cannot be opened. Data1.cab file (or one of the other data CAB files) is lost or destroyed; or the decompressed data file on a CD-ROM is lost.

-114 The specified file cannot be opened with read / write. Can't add to the classified file. Technical support, please contact:

http://support.installshield.com/contact/req_sup.asp.

-115 The specified file cannot be written. Try to override a lock file in a file group, which is invalid if the file group does not lock the lock bit (Potential Locked) or the shared property set to YES or the path to the target folder is invalid.

-117 cannot read the specified file. A data CAB file (.cab) or a decompressed data file may be destroyed.

-118 Does not allow the component group that attempts to operate scripts. The component group name created by a script is passed to a component function that only executes on the file media.

-119 Do not register a file correctly. There are many possible reasons for this error. For details, please refer to the Q101538 documentation in InstallShield Knowledge Base.

-120 cannot update the shared files in ComponentMoveData. internal error.

-121 cannot write files. internal error.

-123 cannot find a file group. You cannot find the specified file group. The missing file group name is returned in the parameter svfilegroup by ComponEnTerror.

The list specified in the -125 component function is invalid. When calling ComponentListItems, ComponentSetUPTyPeenum, confirm that the list you pass to the function is valid.

-126 does not allow for an attempt to operate file media libraries. A file media name is passed to a component function (such as ComponentAddItem) that is executed on the component set created by the script.

-127 Media has been initialized. ComponentInitialize is called to initialize a medium that has been initialized.

-128 The specified file media library is not generated by the InstallShield Media Wizard. Data1.cab file is destroyed, or calls the file specified in ComponentInitialize is not an installshield generated CAB file.

-132 The designated media is not found. The media has been declared but is not associated with any components. Make sure the components or file media components created by scripts are associated with the media.

-133 Specifies an error in the media. ComponentMoveData has been called to transfer files but has not been initialized. If your script calls ComponentMoveData, you must reinitialize it each time you call, you can call it again by letting its first parameter as an empty string. Reinitialization.

-136 cannot allocate memory. There is not enough effective memory installation. Display a message to the end user, close all other applications or cancel the installation, restart the system and restart the installation.

-137 The specified option is invalid. A component function specifies an invalid option, for example, only one file group is specified when a file group and the file name need.

-139 The specified password does not match. The specified password does not match the password saved in the specified file media library or component.

-141 The specified password cannot be found. ComponentValidate is called to verify a component or file media library that is not set password.

-142 media or components passwords are not confirmed. You didn't call ComponentValidate before transferring those components to verify components and / or file media libraries.

The target path of the -145 component is not found. The target directory of a script defined file is not set or invalid. Increase or correct the call to the ComponentSetTarget; then rebuild. -147 Transfer invalid value gives a component related functions. Passing to a component is invalid. For example, the second parameter that passes an empty string to the ComponentAddItem function can cause this error.

-148 data cannot be read from the Internet. This error occurs when INSTALLFROMTHEWEB is connected to InstallShield5. Since the file is broken or the Internet connection is lost, INSTALLSHIELD cannot read data from the Internet by installfromtheweb.

-149 Internet has been disconnected. This error occurs when INSTALLFROMTHEWEB is connected to InstallShield5. The Internet connection has been lost and cannot be re-established via InstallFromTheWeb.

-150 CAB file (.cab) is generated by the old version of InstallShield5. Ensure that the project is built by your installshield5. Make sure you are not using mismatched CAB files (.cab) generated by different versions of InstallShield5.

-620 Third-Party Housler Instrumental In addition, there is a problematic documentation to determine if it is a 100% compatible developer shell.

-623 Rename file error. Attempting to pass an executable (a .exe or .cm file) when the Potentially Locked property is set to YES.

return value:

0: CoMPONENTERROR success.

<0: ComponEnTerror failed.

7.5 ComponentFilterLanguage

Syntax: ComponentFilterLanguage (Szmedialibrary, NLANGID, BFILTERED);

Note: The ComponentFilterLanguage function filters (excluded) files from the language-based file transfer. By default, all languages ​​containing in the media library are not filtered (included). The language ID options used for parameters NLANGID cannot be coupled with a bitwise or operation (|). You must call ComponentFilterLanguage for each language you want to filter or not filter.

Any filtering must also be done when the installer's first runtime is in a maintenance installer. It is determined that the function is called in the code executed during the initial installation and maintenance installation. Do not call this function from the following event handlers: onappsearch, oncpsearch, onfirstuibefore, onfirstuiafter, onmaintuibefore, or onmaintuiafter.

During the installation process, the easiest way to filter language specific file groups is as follows:

Filter (excluded) all languages ​​by calling ComponentFilterLanguage (parameter nLANGID is set to TRUE).

For each language you want to install, you need to set the componentfilterlanguage when NLANGID is set to the appropriate language constant and the parameter bfiltered is set to False. Each call will not filter the file group of the language specified by NLANGID.

You cannot use or operate (|) to specify multiple language constants in the parameter nLANGID location. Specifies that multiple language constants will result in incorrect functions.

When using ComponentFilterLanguage, remember to add #include "sdlang.h" before the program block. If you use setup.rul that is generated by the engineering wizard, the line has been included in it. This function cannot work on the component group created by the script.

parameter:

SZMedialibrary

Specifies the media name of the file media library.

Nlangid

Specifies the ID of the language to filter or not filter. Note You can only specify a language constant for each function call. To filter all languages, deliver Islang_all to this parameter.

Bfiltered

Specifies whether to filter (exclude) or not filtering the language specified by NLANGID. One of the following predefined constants in this parameter location:

True: Screening the language specified by nLANGID; that is, it does not contain it in file transfer.

FALSE: NLANGID specified by NLANGID is not filtered; that is, it contains it in file transfer.

return value:

0: ComponentfilterLanguage is successful.

<0: ComponentFilterLanguage failed.

annotation:

• When you use this function with the getSystemInfo function, you must consider the following: The language constant used to specify the language-specific file group is only a small subset of language constants that can be returned by GetSystemInfo.

· If your installation contains language screening based on these return values, you must use a Switch statement to convert a constant returned by the function to support language screening.

• Any installshield version will allow you to specify any language file group or sub-language supported by Windows; however, for a language specific file group created by the media wizard, the installshield version you use must support the language of the file group. Your installation must also support the language of the file group.

· If your installation contains the language specific file group, it is specified to a language that is not in installshield or your installation support you are using, the file group will be filtered by the Media Wizard (not included).

7.6 ComponentFilteros

Syntax: Componentfilteros (Szmedialibrary, Nupperos, NLowerOS, bfiltered);

Note: The ComponentFilteros function filter flag is a file group that specifies the operating system. Upon default, the operating system is not filtered. This function cannot use the component group created by the script.

Any screening of the initial runtime must also be done at a maintenance installation. Confirm that the function is called in the code executed in the initial and maintenance installation. Do not call this function from the following event handlers: ONAppSearch, OncpSearch, ONFirstuibefore, ONMAINTUIBEFORE, or OnMAINTUIAFTER.

parameter:

SZMedialibrary

Specifies the media name of the file media library.

Nupperos

Specifies the high 32 bits of a 64-bit operating system identifier field. Currently, NupperOS is not used. Transfer 0 to this parameter. Other values ​​are not allowed.

Nloweros

Specifies the low 32-bit 64-bit operating system identifier field. NLOWEROS specifies the operating system you want to filter. You can use a bit or operator (|) to combine the value.

IsOSL_all, isosl_win95, isosl_win98, isosl_win2000

IsOSL_WIN2000_ALPHA, ISOSL_NT40, ISOSL_NT40_ALPHA, BFILTERED

Specifies whether to filter (exclude) or not filtering (include) the operating system specified in N LowerOS. One of the following predefined constants in this parameter location:

TRUE: Screening the specified operating system; that is, they do not include them in file transfer. FALSE: Does not filter the specified operating system; that is, include them in file transfer.

return value:

0: Componentfilteros success.

<0: ComponentFilteros failed. Call ComponEnTerror View additional information.

7.7 ComponentgetData

Syntax: ComponentGetData (Szcomponentsource, Szcomponent, Ninfo, NVResult, SvResult);

Description: The ComponentGetData function retrieves information about a component. Some information cannot be retrieved when SZComponents point to a script created component group.

parameter:

SZComponentsource

Specifies the file media library or script to create the media name of the component group.

Szcomponent

Specifies the component name to be retrieved. See.

Ninfo

Specifies the type of information to retrieve. One of the following predefined constants in this parameter location:

Component_field_description: When the component is displayed when the component is selected in a component dialog. For components in the file media library, this is saved in the Metrical Value in the Component Properties window.

Component_field_fileneed: Defines the key level of the component file for the installation. One of the following values ​​will be set to NVRESULT:

Component_Value_critical: This component contains a key file.

Component_Value_highlyRecommended: This component is highly recommended.

Component_Value_standard: This component can be included or not included.

Component_field_ftplocation: Specifies the contents of the FTP location property in the component pane.

Component_field_httpLocation: Specify the contents of the HTTP location property in the component pane.

Component_field_status (not for script creation component group): The status text is displayed in the progress indicator during file transfer. This is the value stored in the status text domain in the component properties window.

Component_field_visible: Determines if the components in a component selection dialog are visible. For one component in a file media library, this is the value saved in the component properties window. One of the following values ​​will be set to NVRESULT:

TRUE: The component is visible.

FALSE: The component is not visible.

Component_field_password (not for script creating component group): Is there a password and component (in the password field in the Component Properties window). One of the following values ​​will be set to NVRESULT:

TRUE: This component has a password. If the component is a password protected, you must get the correct password from the end user and check it with ComponentValidata before calling the file in the file media library in calling the file media library.

FALSE: This component does not have a password.

Component_field_selected: Determine if the component is selected:

TRUE: This component is selected.

FALSE: This component is not selected.

Component_field_size (not for file media): Specify the original file size of the component. You can also use ComponentGetItemSize to determine the size of a component (excluding sub-parts). Use the companyTotAlSize to determine the total size of all selected components and sub parts. Component_field_misc: Miscellaneous text. This domain is very useful at runtime because you can use it to mark or identify components with any information you want.

Component_field_displayName: Displays the component name in the component selection dialog. For components in the file media library, this is the value displayed in the Component Properties window.

Component_field_cdrom_folder (not for script creation component group): Only the CD-ROM library class. When "File Data" is tested in the disk type pane of the Media Wizard, the location of the decompressed file associated with the specified component is indicated.

NVRESULT

A value value is returned when Ninfo generates a numerical result.

SvResult

Returns a string value when Ninfo generates a string-based result.

return value:

0: ComponentgetData is successful.

<0: ComponentGetData failed. Call ComponEnTerror View additional information.

7.8 ComponentGetItemsize

Syntax: ComponentgetItemsize (Sz Medialibrary, szcomponent, nvsize);

Description: The ComponentGetItemSize function retrieves a specified component in units of bytes. The sub-component size is not included.

This function cannot be used to create a component group.

parameter:

SZMedialibrary

Specifies the media name of the file media library that contains its size to be retrieved.

Szcomponent

Specify the name of the component to be retrieved.

NVSIZE

Returns the size of the specified component in units of bytes. You can also call ComponentGetData to get the total size of the original file of the specified component. Call ComponentTotalsize to determine the total size of all selected components and sub parts.

return value:

0: ComponentgetItemsize is successful.

<0: ComponentGetItemsize failed. Call ComponEnTerror View additional information.

7.9 ComponentgettotAlcost

Syntax: ComponentgetTotalcost (Sz Medialibrary, Szdir, NVTotalRequiredSpace);

Description: The ComponentgetTotalCost function determines that the specified component (for example, by the end user in the component and installation type dialog box) on the target drive (eg, unit). When you determine the required driver space, the function takes into account the size of the cluster on the target drive.

parameter:

SZMedialibrary

Specifies the media name of the file media library that its component has been specified to install and uninstall. Typically, you must deliver system variables Media to this parameter.

SZDir

Specify the drive used, or the path to the drive is used to determine the required driver space.

NVTotalRequiredSpace

Returns the required driver space.

return value:

0: Indicates that the function successfully determines the required driver space.

<0: Indicates that the function does not determine the required drive space.

7.10 ComponentInitialize

Syntax: ComponentInitialize (Szmedialibrary, szmedialibraryfile);

Note: The ComponentInitialize function supports the compatibility of scripts created with InstallShield previous versions. We recommend that you do not use multiple file media libraries in InstallShield Professional 6.0.

The ComponentInitialize function linked a media name and a file media library and prepared the media library to be accessed. This function cannot be used to use the component group created by the script.

parameter:

SZMedialibrary

Specify the media name of the file media library to be transferred by ComponentMoveData.

SzmedialibraryFile

Specifies the file name to be initialized in the file media library. The file name must be the format of xxx1.cab. Do not specify a path; the file must reside in the installation resource folder (SRCDIR).

return value:

0: ComponentInitialize is successful.

<0: ComponentInitialize failed.

annotation:

• No need to call ComponentInitialize before accessing the default media name "Data" default file media library (Data1.cab). The default media is automatically initialized during the installation initialization. The file media library must reside in the installation resource folder. The name of the folder is assigned to the system variable Srcdir during the installation initialization.

· The file name must be xxx1.cab format; for example, second1.cab or wow1.cab.

· Media name "DATA" is kept for use with the default file media library Data1.cab. You can't deliver "DATA" to the parameter szmedialibrary.

7.11 Componentisitemselected

Syntax: ComponentisitemSelected (SzcomponentSource, SZComponent);

Note: The ComponentisiteMselected function only supports the compatibility of scripts created with InstallShield's previous versions. It is recommended that you place the code in the Component Event Processor function to perform component specific tasks.

The ComponentisItemSelected function determines if a specific component is selected. This assembly is usually one selected by the end user in a component selection dialog.

parameter:

SZComponentsource

Specify its settings to be verified by the media name of the component group to create the media group.

Szcomponent

Specifies the component name to be verified.

return value:

True (1): SZComponent is selected.

False (0): Szcomponent is not selected.

<0: The function does not determine if the component is selected. Call ComponeTerror View additional information.

You can also use ComponentGetData to determine if a component is selected.

7.12 ComponentListItems

Syntax: ComponentListIstItems (Szcomponentsource, Szcomponent, ListComponents);

Description: ComponentListItems Function Rolum Lie is under the file media library or script creates all components in the component group under Szcomponent by SZComponents. The list of fully qualified subsystem is saved in ListComponents. If SZComponent doesn't have children, ListComponents will be an empty list.

parameter:

SZComponentsource

Specifies the media name of the file media library or script to be collected by the child.

Szcomponent

Specifies the components to be listed by their sub parts. Passing an empty string ("") to list all top components. For more information about the component and sub parts in the function call, see the front.

Listcomponents

Returns a list of components. The string list specified by ListComponents must have been initialized by calling ListCreat. return value:

0: ComponentListItems Russencing components.

<0: ComponentListItems cannot be listed. Call ComponEnTerror View additional information.

7.13 ComponentmoveData

Syntax: ComponentMoveData (Szmedialibrary, NVDisk, NRESERVED);

Description: The ComponentMoveData function only supports the compatibility of scripts created with InstallShield previous versions. In an event-based script, file transfer is automatically executed. (We recommend that you place the code in the Component Event Processor function to perform the component specific task.)

ComponentMoveData Function Transport / Unzip files associated with selected components in the file media library specified by SZMedialibrary. You can call ComponentMoveData multiple times in the same media, but you must reset the internal structure before the second and subsequent calls, you can implement reset by calling ComponentMoveData (calling the first parameter when calling to an empty string ( "")).

This function cannot be used to use the component group created by the script.

parameter:

SZMedialibrary

Specify the media name of the file media library to be transferred to be transferred.

NVDisk

Returns the last visited disk number. You don't need to initialize NVDisk before calling ComponentMoveData.

NRESERVED

Transfer 0 to this parameter. Other values ​​are not allowed.

return value:

0: ComponentmoveData is successful.

<0: ComponentMoveData failed. Call ComponEnTerror View additional information.

7.14 ComponentreInstall

ComponentreInstall ();

Note: ComponentreInstall causes the next call to ComponentTransferData to reinstall all components, which have been installed when calling ComponentTransferData. ComponentreInstall is typically called during a maintenance installation during the final user to select the "Fix" button in the SDWELCOMEMAINT dialog box.

parameter:

no.

return value:

0: Indicates that the function is ready for reinstall.

<0: Indicates that the function is not prepared for reinstall.

7.15 ComponentremoveAll

ComponentremoveAll ();

Description: An installation that has been running, after the ComponEntremoveAll function is called, the next to the COMPONENTTRANSFERDATA will uninstall the installation.

parameter:

no.

return value:

0: Indicates that the function is successfully prepared to uninstall.

<0: Indicates that the function is not ready to uninstall initialization.

7.16 ComponentSelectItem

Syntax: ComponentSelectItem (Szcomponentsource, SZComponent, Bselect);

Description: The ComponentSelectItem function only supports the compatibility of scripts created with InstallShield's previous versions of the INSTALLSHILD. We recommend that you place the code in the Component Event Processor function to perform component specific tasks.

The ComponentSelectItem function sets the selected status of a component to select or undo the selected. Before the component is displayed in the Components dialog box, you can use ComponentSelectItem to modify the selected state, and you can use it according to your needs to modify or override the selection. parameter:

SZComponentsource

Specifies the media name of the component library or script to create a file media library or script to be set.

Szcomponent

Specify the components to be set in its selected state.

Bselacted

Specifies whether the component is to be selected or undo selected. One of the following predefined constants in this parameter location:

TRUE: Select the specified component.

FALSE: Undo the selected component.

return value:

0: ComponentSelectItem successfully sets the selected status of the project.

<0: ComponentSelectItem failed to set the selected status of the project. Call ComponEnTerror View additional information.

7.17 ComponentSetData

Syntax: ComponentSetData (Szcomponentsource, Szcomponent, Ninfo, NDATA, SZDATA);

Description: The ComponentSetData function Sets the properties and data for the specified component. Most portions, settings, and domain settings in the Component Properties window, can be reached from the component panes in the InstallShield IDE. Note that some domains cannot be set for the component group created by the script.

parameter:

SZComponentsource

Specify its properties and data to be set to the media library or script creation of the media name of the component set.

Szcomponent

Specify the component name.

Ninfo

Specifies the type of information to be set. One of the following predefined constants in this parameter location:

Component_field_description: This text is displayed in the Description Domain in the Component Selection dialog.

Component_field_ftplocation: A FTP location.

Component_field_httpLocation: An HTTP location. .

Component_field_status (Not applicable to script creation components): This text is displayed in the progress indicator during file transfer.

Component_field_visible: Indicates if the component is visible. Parameter NDATA can be one of the following:

TRUE: The component is visible.

FALSE: The component is not visible.

Component_field_selected: Sets the selected status of the component. The setting is the same as the effect of the ComponentSelectItem. Parameter NDATA can be one of the following:

TRUE: Select the component item.

False: Undo the selected component item.

Component_field_size (not file media library): The total raw file size of the component.

Component_field_misc: Miscellaneous text.

Component_field_displayName: Determines the component name displayed in the Component Selection dialog.

Component_field_cdrom_folder (not created in the script): Distribute only the media library for the CD-ROM. The positioning of component data on the CD.

Component_field_image: Cover the default icon for a component assignments. The index of the icon that is displayed in NDATA. To indicate that the component does not display the icon, pass -1 in NDATA.

NDATA

When the information indicated by Ninfo is a value, a numeric value is specified.

Szdata

When the information indicated by the Ninfo is a string, a string value is specified.

return value:

0: ComponentSetData is successful.

<0: ComponentSetData failed. Call ComponEnTerror View additional information. 7.18 ComponentSetTarget

Syntax: ComponentSetTarget (SzMedialibrary, SzPropertyVar, Szlocation);

Note: The ComponentSetTarget function assigns the value of Szlocation to the attribute variable specified by Szpropertyvar. Attribute variables can be used in the target domain of the file group window and the TARGET field of the simple attribute window. The value of Szlocation must be a full path (including the drive letter and colon) or a partial path, depending on how Szpropertyvar is used. You must confirm that szlocation is the correct form of path expressions. Call the ComponentSetTarget before calling ComponentTransferData.

This function cannot be used to use the component group created by the script.

parameter:

SZMedialibrary

Specifies the media name of the file media library to set their user-defined variables.

Szpropertyvar

Specifies the user-defined variable. In InstallShield IDE, the user-defined variable is used in the format of the . Repositing user-defined variables as a string, including parentheses. E.g:

Szpropertyvar = "";

Szlocation

Specify path expressions instead of user-defined variables. This string must contain additional quotes, even if it specifies a long path.

return value:

This function always returns 0.

7.19 ComponentSetupTyPEENUM

Syntax: ComponentSetuptyPEENUM (SZMEDIBRARY, LISTSETUPTYPES);

Note: The ComponentSetUPTyPeenum function lists all installation types that specify the media. These installation types can be defined in the IDE and saved in the file media library. ComponentSetUPTyPEENUM cannot work on the component group created by the script. You must create a list of listUPTypes string using the ListCreat function.

parameter:

SZMedialibrary

Specifies the media name of the file media library to be listed by the installation type.

Listsetuptypes

Returns a list of all installation types on the specified media. A list of strings identified by a listSetuPType must have been initialized by calling ListCreate.

return value:

0: ComponentSetUPTyPeenum successfully.

<0: ComponentSetuPTyPEENUM failed.

7.20 ComponentSetupTypegetdata

Syntax: ComponentSetuptypegetdata (Szset DiPType, Ninfo, NVResult, SvResult);

Description: ComponentSetUPTypegetData function retrieves data that is associated with a specified installation type. Then you can use this data any. This function cannot be used to use the component group created by the script.

parameter:

SZMedialibrary

Specifies the media name of the file media library, retrieves data associated with a installation type from the library.

SzsetupType

Specify the installation type name. This name must be specified as exactly the same as the display in InstallShield IDE, for example, "typical".

Ninfo

Specifies the information to retrieve. One of the following predefined constants in this parameter location:

SetUPTYPE_INFO_DESCRIPTION: Retrieves the description of the specified installation type. The description is returned by the parameter svresult.

SetUPType_info_displayName: Retrieve the name of the installation type display. The name is returned by the parameter svresult. NVRESULT

When Ninfo specifies a numeric or long integer type information, the value of the type is returned.

SvResult

When Ninfo specifies information of a string type, the value of this type is returned.

return value:

0: ComponentSetUPTypegetData is successful.

<0: ComponentSetuPTypegetData failed. Call ComponEnTerror View additional information.

annotation:

· A typical application of ComponentSetuptyPEGETDATA may be to display the installation type information in a custom installation type-related dialog. You will call ComponentSetUPTypeTData in the Switch-Case statement after the Waitondialog displaying the custom dialog.

7.21 ComponentSetuptypeset

Syntax: ComponentSetupTypeset (Szmedialibrary, SzsetuPType);

Note: The ComponentSetuptypeset function is set in the specified installation type in the file media library indicated by Szmedialibrary. You can use the ComponentSetuPTypeset to override the options made in a installation type dialog (such as SDSETUPTYPEEX).

This function cannot use the component group created by the script.

parameter:

SZMedialibrary

Specifies the media name of the file media library to set the installation type.

SzsetupType

Specifies how to install the type.

return value:

0: ComponentSetuptypeset success.

<0: ComponentSetupTypeset failed.

7.22 ComponentTotAlSize

Syntax: ComponentTotalsize (Sz Medialibrary, Szcomponent, BinCludesubcomp, btargetsize);

Note: The ComponentTotalsize function returns the total size of the selected components specified by SZComponent by the number of bytes. In order to include sub-components in size, set bincludesubcomp to TRUE. To get the total size of all components in the specified media, set SZComponEt as an empty string ("") and set bincludesubcomp to true.

You may notice a small difference. This difference is attributed to the rounding of their value when these dialogs are calculated.

parameter:

SZMedialibrary

Specifies the file name of the file media library, the total size of the selected components from the media library is returned.

Szcomponent

Specifies the component name to be retrieved. To retrieve the size of the entire medium, pass an empty string ("") to this parameter. For more information on components and sub parts in the function call, in the foregoing.

Bincludesubcomp

Indicates whether the sub-part of the selected SZComponent is required. One of the following predefined constants in this parameter location:

TRUE: The selected sub-part is included in the size calculation.

FALSE: The selected sub-part is not included in the size calculation.

BTARGETSIZE

Indicates whether to retrieve the original / non-compressed size or the size of the media library. One of the following predefined constants is passed in this parameter:

True: Retrieve the original / non-compressed size;

FALSE: Retrieves the size in the media library.

return value:

XXXX: The total size of the selected components (number of bytes).

<0: ComponentTotalsize failed. Call ComponEnTerror View additional information.

7.23 ComponentTransferData

Syntax: ComponentTransferData (Szmedialibrary);

Note: In an event-based script, the ComponentTransferData function is automatically called after the First UI Before event, and interacts with Moving, Moved, and Component events. ComponentTransferData installs or uninstall components as appropriate or unload components based on the selected state of the component and whether it is installed. ComponentTransferData doing the following:

Install selected (eg, the end user in the component or installation type dialog) and the currently not installed components.

The uninstallation is not selected and the component currently installed.

The installer determines if a component is now installed by reading a log file in the existing installation initialization process.

parameter:

SZMedialibrary

Specify the media name of the file media library that its component has been specified to be installed or unloaded. Typically, you can transfer system variables Media to this parameter.

return value:

0: Indicates that the function successfully executes the installation and uninstall of the component.

<0: Indicates that the function does not perform the installation and uninstall of the component.

7.24 ComponentUpdate

ComponentUpdate ();

Note: ComponentUpdate causes the next to the COMPONENTTRANSFERDATA to reinstall all components that have been installed when calling ComponentTransferData, in addition to components that contain files required to maintain installation and uninstall (note that these components are automatically placed automatically by the media generator) Go to your .cab file, not in the IDE). ComponentUpdate is typically called in a patch or maintenance component installation.

ComponentUpdate and ComponentreInstall are similar, but ComponentreInstall also reinstalls components that contain files required when maintaining and uninstalling.

parameter:

no.

return value:

0: Indicates that the function is successfully prepared to update the installation.

<0: Indicates that the function is not ready to update the installation.

7.25 ComponentValidate

Syntax: ComponentValidate (Sz Medialibrary, Szcomponent, Szpassword);

Description: ComponentValidate function Verifies the password of the file media library or a specified component.

This function cannot be used to use the component group created by the script.

parameter:

SZMedialibrary

Specify the file media library name to verify the password.

Szcomponent

Specify the component name. If the parameter is an empty string (""), it is assumed to be the entire media library. See 7.1 for more information on components and sub parts in function calls.

Szpassword

Specifies the password to verify.

return value:

0: ComponentValidate is successful.

<0: ComponentValidate failed. Call ComponEnTerror View additional information.

7.26 SDSETUPTYPE

See 5.27

7.27 SDSETUPTYPEEX

See 5.28

转载请注明原文地址:https://www.9cbs.com/read-30520.html

New Post(0)