ISWiComponent Object
Project:This information applies to the following project types:
• | Basic MSI |
• | DIM |
• | InstallScript |
• | InstallScript MSI |
• | InstallScript Object |
• | Merge Module |
Project-specific differences are noted where appropriate.
ISWiComponent represents a component in the InstallShield user interface. You can retrieve a component by specifying an item in the ISWiComponents collection. The component can be one created in the IDE or as a result of calling AddComponent.
Many component attributes are available in the automation interface through this object’s methods and properties. Refer to the following table to see which methods, properties, and collections are available for your project type.
Members
Name |
Project |
Type |
Description |
||||||||||||||||||||||||||||||||||||||||||
InstallScript, InstallScript Object |
Method |
Adds a subfolder to the current ISWiComponent. |
|||||||||||||||||||||||||||||||||||||||||||
Basic MSI, InstallScript, InstallScript MSI, Merge Module |
Method |
Adds a dynamic file link to the current component. |
|||||||||||||||||||||||||||||||||||||||||||
Basic MSI, InstallScript MSI, Merge Module |
Method |
Adds an environment variable to the current component. |
|||||||||||||||||||||||||||||||||||||||||||
All |
Method |
Adds a file to the current component. |
|||||||||||||||||||||||||||||||||||||||||||
Basic MSI, InstallScript MSI, Merge Module |
Method |
Adds a file or folder removal entry to the current component. |
|||||||||||||||||||||||||||||||||||||||||||
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
Set this property to True to have the component registered as 64-bit. Setting this property to False causes the component to be registered as 32-bit. If the component is 64-bit and is replacing a 32-bit component, be sure to provide a new GUID via the GUID property. Note that 64-bit support requires version 2.0 of the Windows Installer service. |
|||||||||||||||||||||||||||||||||||||||||||
Comments |
All |
Read-Write Property |
Gets or sets the comments for this component. |
||||||||||||||||||||||||||||||||||||||||||
Compressed |
InstallScript, InstallScript Object |
Read-Write Property |
This Boolean property gets or sets the component's Compressed property, which specifies whether to compress the component's files (True) or leave them uncompressed (False) when the files are stored in a cabinet file by the release builder. |
||||||||||||||||||||||||||||||||||||||||||
Condition |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
Contains any condition associated with the component. |
||||||||||||||||||||||||||||||||||||||||||
Destination |
All |
Read-Write Property |
Gets or sets the component’s destination. The following formats are valid:
Important:Setting the Destination property for the ISWiComponent object resets the object’s SourceLocation property. Therefore, any code that sets the SourceLocation property should be placed after any code that sets the Destination property. |
||||||||||||||||||||||||||||||||||||||||||
DeviceDriverFlags |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
This property is no longer supported. |
||||||||||||||||||||||||||||||||||||||||||
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
This property enables you to specify the flag settings for device drivers and run-time options directly from the automation layer. |
|||||||||||||||||||||||||||||||||||||||||||
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
This property sets the .dll used at run time for all device driver installations. |
|||||||||||||||||||||||||||||||||||||||||||
DeviceDriverUse64BitRedist |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
This property is no longer supported. |
||||||||||||||||||||||||||||||||||||||||||
DeviceDriverUseLocalizedRedist |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
This property is no longer supported. |
||||||||||||||||||||||||||||||||||||||||||
Difference |
InstallScript, InstallScript Object |
Read-Write Property |
This Boolean property gets or sets the component's Difference property, which specifies whether to accept (True) or override (False) the default behavior of the media builder when building a differential media—which is to exclude a file in this component from the differential media if the same file (with the same date and time, size, and attributes) exists in each of the specified comparison media. |
||||||||||||||||||||||||||||||||||||||||||
DotNetApplicationFile |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
To install your assembly as private, set this attribute to the FileKey of the file that contains your assembly. If this property is set to NULL, your assembly will be installed to the Global Assembly Cache. |
||||||||||||||||||||||||||||||||||||||||||
DotNetAssembly |
InstallScript, InstallScript Object |
Read-Write Property |
This Boolean property gets or sets the component's .NET Assembly property, which specifies whether the component's files are installed as local .NET assemblies (True) or not installed as assemblies (False). |
||||||||||||||||||||||||||||||||||||||||||
DotNetCOMInterop |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
Set this to True if your .NET assembly needs to be available from COM calls. |
||||||||||||||||||||||||||||||||||||||||||
DotNetInstallerClass |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
Set this to True if your assembly implements methods from the .NET Installer namespace. |
||||||||||||||||||||||||||||||||||||||||||
DotNetInstallerClassArgCommit |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
This property allows you to specify argument lists for the Installer class when the Commit method is called. |
||||||||||||||||||||||||||||||||||||||||||
DotNetInstallerClassArgInstall |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
This property allows you to specify the argument lists for the Install execution context for the Installer class. |
||||||||||||||||||||||||||||||||||||||||||
DotNetInstallerClassArgRollback |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
This property allows you to specify argument lists for the Installer class when the Rollback method is called. |
||||||||||||||||||||||||||||||||||||||||||
DotNetInstallerClassArgUninstall |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
This property allows you to specify the argument lists for the Uninstall execution context for the Installer class. |
||||||||||||||||||||||||||||||||||||||||||
DotNetPrecompile |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
If this property is set to True, at installation the setup creates a native image from the .NET assembly and installs it to the native image cache on the target system. This allows the assembly to load and execute faster, because it restores code and data structures from the native image cache rather than from just-in-time (JIT) compilation. |
||||||||||||||||||||||||||||||||||||||||||
DotNetScanAtBuild |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
This property instructs the build engine on how to handle your assembly. Set it to one of the following values:
|
||||||||||||||||||||||||||||||||||||||||||
ExtractAtBuild |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
Gets or sets the component's COM Extract at Build setting. Possible values are True and False. |
||||||||||||||||||||||||||||||||||||||||||
FTPLocation |
InstallScript, InstallScript Object |
Read-Write Property |
Gets or sets the component's FTP Location property, which specifies an FTP location for the component. |
||||||||||||||||||||||||||||||||||||||||||
GUID |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
Holds a string GUID, also known as the Component Code property, surrounded by braces—{12345678-1234-1234-1234-1234567890AB}, for example. |
||||||||||||||||||||||||||||||||||||||||||
HTTPLocation |
InstallScript, InstallScript Object |
Read-Write Property |
Gets or sets the component's HTTP Location property, which specifies an HTTP location for the component. |
||||||||||||||||||||||||||||||||||||||||||
All |
Method |
Imports INI files from the automation layer. |
|||||||||||||||||||||||||||||||||||||||||||
All |
Method |
Merges the contents of a REG file with the registry data for this component. |
|||||||||||||||||||||||||||||||||||||||||||
IsDeviceDriver |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
If this Boolean property is true, the key file for this component is a device driver package; if the property is false, the key file is not a device driver package. |
||||||||||||||||||||||||||||||||||||||||||
InstallScript, InstallScript Object |
Read-Write Property |
In conjunction with the PlatformSuiteCheck property, gets or sets the component's Platform Suite(s) property, which specifies to what platform suites, if any, the component is specific. Use the following constants to set this property:
For example: pFeature.IsPlatformSelected(epsWinXPHome) = True |
|||||||||||||||||||||||||||||||||||||||||||
InstallScript, InstallScript Object |
Collection |
Contains all of the subfolders associated with this component. |
|||||||||||||||||||||||||||||||||||||||||||
Basic MSI, DIM, InstallScript, InstallScript MSI, Merge Module |
Collection |
Contains all of the dynamic file links that are associated with a specified component. |
|||||||||||||||||||||||||||||||||||||||||||
Basic MSI, DIM, InstallScript MSI, Merge Module |
Collection |
Contains all of the environment variables that are associated with this component. |
|||||||||||||||||||||||||||||||||||||||||||
Basic MSI, DIM, InstallScript, InstallScript MSI, InstallScript Object, Merge Module |
Collection |
Contains all of the files associated with this component. |
|||||||||||||||||||||||||||||||||||||||||||
Basic MSI, DIM, InstallScript, InstallScript MSI, InstallScript Object, Merge Module |
Collection |
Contains all of the folders associated with this component. |
|||||||||||||||||||||||||||||||||||||||||||
Basic MSI, DIM, InstallScript MSI, Merge Module |
Method |
Returns an ISWiRemoveFiles collection that contains all of the file and folder removal entries that are associated with the current component. |
|||||||||||||||||||||||||||||||||||||||||||
KeyPath |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
Note:ISWiComponent.KeyPathType must be set before setting ISWiComponent.KeyPath. Errors result if this is done in the reverse order. Contains the file or registry entry that serves as this component's key path. The exact type is indicated by the KeyPathType property, below. When the key path is a key file, it contains the file key. You can view this value in the Key column of a component's file list, but be aware that file keys are subject to change when the files are dynamically linked. The file key is the same as the Name property of an ISWiFile object. When the key path is a registry value, there is a specially formatted string that contains the registry key. The path to the registry key is enclosed in square brackets and separated from the value name with a vertical bar (or pipe character). For example, the following lines set the key path for the component m_MyComponent to the value MyName under HKEY_LOCAL_MACHINE\Software\MyCompany\Settings: m_MyComponent.KeyPathType = kptRegistry m_MyComponent.KeyPath = "[HKEY_LOCAL_MACHINE\Software\MyCompany\Settings]|MyName" A file cannot serve as the key file if it is dynamically linked. |
||||||||||||||||||||||||||||||||||||||||||
KeyPathType |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
ISWiComponent.KeyPathType must be set before setting ISWiComponent.KeyPath. Errors result if this is done in the reverse order.Stores a value that points to the precise type of key path contained in the KeyPath property. Specify one of the following types:
Note that the automation interface can set the key path type only to kptRegistry or kptFile, but the other values are possible return values if you are reading the current key path type. |
||||||||||||||||||||||||||||||||||||||||||
Miscellaneous |
InstallScript, InstallScript Object |
Read-Write Property |
Gets or sets the component's Miscellaneous property, which associates a text string with the component. |
||||||||||||||||||||||||||||||||||||||||||
Name |
All |
Read-Only Property |
Component name of the current item in the collection. |
||||||||||||||||||||||||||||||||||||||||||
NeverOverwrite |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
Instructs the installer whether to replace an existing component. Specify True to leave the existing component or False to replace it. |
||||||||||||||||||||||||||||||||||||||||||
InstallScript, InstallScript MSI, InstallScript Object |
Read-Write Property |
Gets or sets the component's Operating Systems setting. If the target machine’s operating system does not match one of the operating systems that are specified for this setting, the component is not installed. By default, components are operating system independent, meaning that none of the component’s data are specific to certain operating systems. |
|||||||||||||||||||||||||||||||||||||||||||
OSFilter (cont.) |
|
|
Use the following constants to set this property:
You can specify multiple platforms; for example, eosWin7 Or eosWinServer2008 Or eosWinVista Or eosWinServer2003. Tip:Use this property with the IsPlatformSelected property to distinguish between Windows Vista and Windows Server 2008, or between Windows 7 and Windows Server 2008 R2, or between Windows 8 and Windows Server 2012, or between Windows 8.1 and Windows Server 2012 R2. |
||||||||||||||||||||||||||||||||||||||||||
OverwriteMainOptions |
InstallScript, InstallScript Object |
Read-Write Property |
In conjunction with the OverwriteSubOptionsVersion and OverwriteSubOptionsDate properties, gets or sets the component's Overwrite property, which specifies whether the component's files overwrite already-existing versions on the target system always, never, or conditionally based on date/time stamp or version number. Use the following constants to set this property:
|
||||||||||||||||||||||||||||||||||||||||||
OverwriteSubOptionsDate |
InstallScript, InstallScript Object |
Read-Write Property |
In conjunction with the OverwriteMainOptions and OverwriteSubOptionsVersion properties, gets or sets the component's Overwrite property, which specifies whether the component's files overwrite already-existing versions on the target system always, never, or conditionally based on date/time stamp or version number. Ignored if OverwriteMainOptions is set to ecomoAlways, ecomoByVersion, or ecomoNever. Use the following constants to set this property:
|
||||||||||||||||||||||||||||||||||||||||||
OverwriteSubOptionsVersion |
InstallScript, InstallScript Object |
Read-Write Property |
In conjunction with the OverwriteMainOptions and OverwriteSubOptionsDate properties, gets or sets the component's Overwrite property, which specifies whether the component's files overwrite already-existing versions on the target system always, never, or conditionally based on date/time stamp or version number. Ignored if OverwriteMainOptions is set to ecomoAlways, ecomoByDate, or ecomoNever. Use the following constants to set this property:
|
||||||||||||||||||||||||||||||||||||||||||
Permanent |
All |
Read-Write Property |
This property corresponds to the Permanent component property in the IDE. Set Permanent to True to make sure the component is never removed; False otherwise. |
||||||||||||||||||||||||||||||||||||||||||
InstallScript, InstallScript Object |
Read-Write Property |
In conjunction with the IsPlatformSelected property, gets or sets the component's Platform Suite(s) property, which specifies to what platform suites, if any, the component is specific. Use the following constants to set this property:
|
|||||||||||||||||||||||||||||||||||||||||||
PotentiallyLocked |
InstallScript, InstallScript Object |
Read-Write Property |
This Boolean property gets or sets the component's Potentially Locked property, which specifies whether already-installed versions of the component's files may be locked—that is, in use by another application—during setup. |
||||||||||||||||||||||||||||||||||||||||||
RegFileToMergeAtBuild |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
Provides the complete path to a .reg file to have it merged with the component's registry entries at build time. |
||||||||||||||||||||||||||||||||||||||||||
RegistrationType |
Basic MSI, InstallScript MSI, Merge Module |
Property |
The following options are available for determining the source of the registration information for this component:
Because the Registration Type property has been removed from the component views in the IDE, setting the RegistrationType property in the automation interface has the following effects:
|
||||||||||||||||||||||||||||||||||||||||||
RemoteInstallation |
Basic MSI, InstallScript MSI, Merge Module |
Read-Write Property |
Use one of the following options to install the component's files locally or leave them on the distribution medium:
|
||||||||||||||||||||||||||||||||||||||||||
InstallScript, InstallScript Object |
Method |
Removes a subfolder to the current ISWiComponent. |
|||||||||||||||||||||||||||||||||||||||||||
Basic MSI, InstallScript, InstallScript MSI, Merge Module |
Method |
Removes a dynamic file link from the current component. |
|||||||||||||||||||||||||||||||||||||||||||
Basic MSI, InstallScript MSI, Merge Module |
Method |
Removes an environment variable from the current component. |
|||||||||||||||||||||||||||||||||||||||||||
All |
Method |
Removes a file from the current component. |
|||||||||||||||||||||||||||||||||||||||||||
Basic MSI, DIM, InstallScript MSI, Merge Module |
Method |
Removes a file or folder removal entry from the current component. To remove a file or folder removal entry from the project, pass the ISWiRemoveFile object. |
|||||||||||||||||||||||||||||||||||||||||||
SelfRegister |
InstallScript, InstallScript Object |
Read-Write Property |
This Boolean property gets or sets the component's Self-Register property, which specifies whether the component's files are self-registering. |
||||||||||||||||||||||||||||||||||||||||||
SharedDLLRefCount |
All |
Read-Write Property |
True indicates that the installer should increment a reference count for each file in this component when it is installed, False otherwise. |
||||||||||||||||||||||||||||||||||||||||||
SourceLocation |
All |
Read-Write Property |
Provides the name of a folder in the compressed setup package or in the release location where this component’s files are stored when you build a release. This property is identical to a component’s Source Location setting in InstallShield. Important:Setting the Destination property for the ISWiComponent object resets the object’s SourceLocation property. Therefore, any code that sets the SourceLocation property should be placed after any code that sets the Destination property. |
||||||||||||||||||||||||||||||||||||||||||
Transitive |
All |
Read-Write Property |
Set this property to True to have the installer re-evaluate the condition when this component is reinstalled, False otherwise. |
Applies To
• | ISWiFeature |