InstallShield 2016 » Automation Interface » ISWiComponent Object and ISWiComponentSubFolder 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.
ISWiFile represents a file belonging to a component or, in InstallScript projects, a component subfolder in your project. The file can be an existing one from the InstallShield user interface or one added by calling AddFile.
Many feature properties and attributes are available in the automation interface through this object’s methods, properties, and collections. Note that some methods, properties, and collections are available for specific project types.
Use the component’s ISWiFiles collection to access a specific file. You must specify either an index number or the file key for the Item property of ISWiFiles. The file key is visible in the File column of the File table in the Director Editor view of InstallShield. In Basic MSI and InstallScript MSI projects, it is also listed under the Key column in a component’s file list.
Unfortunately, you might not know the file key, or it might have been reassigned if the files are dynamically linked to the component. Instead of using the file key, you could write code similar to the following example to check for a certain file name:
Dim m_pFile As ISWiFile
For Each m_pFile In m_pComponent.ISWiFiles
If UCase(m_pFile.DisplayName) = "MYFILE.EXE" Then
Exit For
End If
Next
If the file name MyFile.exe is found among the component’s files, the For loop ends, and m_pFile holds a copy of the ISWiFile object for MyFile.exe.
Members
Name |
Project |
Type |
Description |
Attributes |
Basic MSI, InstallScript MSI |
Property (Deprecated) |
This property is no longer supported. Use the Hidden, ReadOnly, System, and Vital properties instead. |
CompanionFile |
Basic MSI, DIM, InstallScript, InstallScript MSI, InstallScript Object, Merge Module |
Read-Write Property |
Reserved for future use. |
DisplayName |
Basic MSI, DIM, InstallScript, InstallScript MSI, InstallScript Object, Merge Module |
Read-Write Property |
The standard name of the file. Be sure that case of this entry matches the case of the file name if you plan on distributing your package via the Internet, since some Web servers are case-sensitive. The name cannot contain any characters that are not valid for Windows folders and file names. If the file has both a long and a short file name (see ShortName, below), only the long name is used in the display name. You cannot modify this property if the files are dynamically linked. |
DynamicFile |
Basic MSI, DIM, InstallScript, InstallScript MSI, Merge Module |
Read-Only Property |
This property is True if the file's source is linked to the component dynamically, or False if it is linked statically. |
FontTitle |
Basic MSI, DIM, InstallScript MSI, Merge Module |
Read-Write Property |
Retrieves or sets the Font Title file attribute as a string. You cannot modify this property if the files are dynamically linked. |
FullPath |
Basic MSI, DIM, InstallScript, InstallScript MSI, InstallScript Object, Merge Module |
Read-Write Property |
Stores the fully qualified path (including the file name) of the file's source location. Any path variables are resolved to the actual path. You cannot modify this property if the files are dynamically linked. |
Hidden |
Basic MSI, DIM, InstallScript MSI, Merge Module |
Read-Write Property |
True if a file has the Hidden attribute set. This property is ignored if OverrideSystemAttributes is set to False. You cannot modify this property if the files are dynamically linked. |
Languages |
Basic MSI, DIM, InstallScript MSI, Merge Module |
Read-Write Property |
This property should contain a string of all of the file's language IDs, in decimal and separated by commas. The following line identifies the file as English and German: m_pFile.Languages = "1031,1033" This property is ignored if OverrideSystemLanguage is set to True. You cannot modify this property if the files are dynamically linked. |
Modified |
Basic MSI, DIM, InstallScript MSI, Merge Module |
Read-Write Property |
Retrieves the file's Modified file attribute. Reserved for future use. |
Name |
Basic MSI, DIM, InstallScript MSI, Merge Module |
Read-Write Property |
Retrieves or sets a file key. See the description of ISWiFile above for more information about the file key. You cannot modify this property if the files are dynamically linked. |
OverrideSystemAttributes |
Basic MSI, DIM, InstallScript MSI, Merge Module |
Read-Write Property |
To override the development system's settings for all of the file attributes, such as Hidden, ReadOnly, Vital, and System, set this property to True. If you set this property to False, the Hidden, ReadOnly, Vital, and System properties are ignored. You cannot modify this property if the files are dynamically linked. |
OverrideSystemLanguage |
Basic MSI, DIM, InstallScript MSI, Merge Module |
Read-Write Property |
To override the language of the file on the development system, set this property to True. If you set this property to False, the Languages property is ignored. You cannot modify this property if the files are dynamically linked. |
OverrideSystemSize |
Basic MSI, DIM, InstallScript MSI, Merge Module |
Read-Write Property |
To override the size of the file on the development system, set this property to True. If you set this property to False, the Size property is ignored. You cannot modify this property if the files are dynamically linked. |
OverrideSystemVersion |
Basic MSI, DIM, InstallScript MSI, Merge Module |
Read-Write Property |
To override the version of the file version on the development system, set this property to True. If you set this property to False, the Version property is ignored. You cannot modify this property if the files are dynamically linked. |
ReadOnly |
Basic MSI, DIM, InstallScript, InstallScript MSI, InstallScript Object, Merge Module |
Read-Write Property |
Retrieves or sets the Read-only file attribute. Set this property to True to mark a file as read-only. Leave it undefined or set it to False to mark a file as read-write. This property is ignored if OverrideSystemAttributes is set to False. You cannot modify this property if the files are dynamically linked. |
SelfRegister |
Basic MSI, DIM, InstallScript MSI, Merge Module |
Read-Write Property |
Gets or sets the Self-Register file attribute. Set this property to True to mark a file as self-registering. You cannot modify this property if the files are dynamically linked. |
ShortName |
Basic MSI, DIM, InstallScript, InstallScript MSI, InstallScript Object, Merge Module |
Read-Write Property |
Gets or sets the file's short name. Your files must have corresponding short names in case the Windows Installer property SHORTFILENAMES is set because the distribution medium cannot handle long file names. Only the short file names are used when you deselect “Use long file names” in the Advanced Settings panel of the Release wizard. By default, the build process will generate short names for your files, and therefore reading the current value of a file's ShortName property will return an empty string. However, if you explicitly set a file's ShortName property, the build process will use the short name you specify, and reading the ShortName value will return the short name you specified. You cannot modify this property if the files are dynamically linked. |
Size |
Basic MSI, DIM, InstallScript MSI, Merge Module |
Read-Write Property |
Contains the size of the file, in bytes, as a Long. If you are setting this property, OverrideSystemSize must first be set to True. Otherwise, InstallShield uses the actual size of the file. You cannot modify this property if the files are dynamically linked. |
System |
Basic MSI, DIM, InstallScript MSI, Merge Module |
Read-Write Property |
Retrieves or sets the System file attribute. Set this property to True if the file is a system file. This property is ignored if OverrideSystemAttributes is set to False. You cannot modify this property if the files are dynamically linked. |
UseSystemSettings |
Basic MSI, InstallScript MSI |
Property (Obsolete) |
This property is no longer supported. Use the OverrideSystemAttributes, OverrideSystemSize, OverrideSystemVersion, and OverrideSystemLanguage properties instead. |
Version |
Basic MSI, DIM, InstallScript MSI, Merge Module |
Read-Write Property |
Set this property to the version of the file that you are including in the setup. To specify a companion file, this property can also be set to the Name property of another ISWiFile object, provided. To learn more about companion files, see Companion Files. This property is ignored if OverrideSystemVersion is set to False. You cannot modify this property if the files are dynamically linked. |
Vital |
Basic MSI, DIM, InstallScript MSI, Merge Module |
Read-Write Property |
Retrieves or sets the Vital file attribute. Set this property to True to mark this file as vital. You cannot modify this property if the files are dynamically linked. |
InstallShield 2016 Help LibraryAugust 2016 |
Copyright Information | Flexera Software |