ISWiAdvancedFile Object

InstallShield 2019 » Automation Interface

Project • This information applies to the following project types:

Basic MSI
InstallScript
InstallScript MSI
InstallScript Object

ISWiAdvancedFile represents an advanced file in your project. The advanced file can be an existing one from the Support Files view (or the Support Files/Billboards view) in InstallShield or one added by calling AddAdvancedFile.

Use the project's ISWiAdvancedFiles collection to access a specific advanced file. You must specify either an index number or the file key for the Item property of ISWiAdvancedFiles.

Members

ISWiAdvancedFile Object Members

Name

Type

Description

Name

Read-Only Property

Stores the file key of the advanced file. See the description of ISWiFile above for more information about the file key.

BuildSourcePath

Read-Write Property

Stores the advanced file's fully qualified source filename. Any path variables are resolved to the actual path.

Disk

Read-Write Property

This enumerated integer property specifies the Advanced Files folder in which you want to add the advanced file. Specify one of the following values:

edtDisk1 (1)—Specifies the Disk 1 folder.
edtLastDisk (-1)—Specifies the Last Disk folder.
edtOther (0)—Specifies the Other folder.

Example

The file key is visible in the IDE only as the first entry in the Direct Editor view's ISDisk1 table. Instead of using the file key, you could write code similar to the following example to check for a certain file name:

    Dim pProj As ISWiProject

    Set pProj = CreateObject("IswiAutoAutomation Interface Version.ISWiProject")

    pProj.OpenProject "C:\MySetups\Project1.ism"

    Dim pAdvancedFile As ISWiAdvancedFile

    

    For Each pAdvancedFile In pProj.ISWiAdvancedFiles

        If UCase(pAdvancedFile.BuildSourcePath) = "C:\MY FILES\MYADVANCEDFILE.EXT" Then

            Exit For

        End If

    Next

 

    pProj.SaveProject

    pProj.CloseProject

If the file C:\My Files\MyAdvancedFile.ext is found among the project's setup files, the For loop ends, and pAdvancedFile holds a copy of the ISWiAdvancedFile object for C:\My Files\MyAdvancedFile.ext.

Applies To

ISWiProject