ISWiFolders Collection

InstallShield 2016 » Automation Interface

Project • This information applies to the following project types:

Basic MSI
DIM
InstallScript
InstallScript MSI
InstallScript Object
Merge Module

ISWiFolders contains every program folder belonging to a specified component.

At minimum, each component has the default folders listed below in its ISWiFolders collection. In addition, you could have added a predefined folder to the Shortcuts explorer by right-clicking on Shortcuts and choosing “Show Folder.”

[TaskBarFolder]
[SendToFolder]
[DesktopFolder]

The following code demonstrates accessing the ISWiFolder object that represents the taskbar:

    Dim m_pFolder As ISWiFolder

    Set m_pFolder = m_pComponent.ISWiFolders("[TaskBarFolder]")

The taskbar, in turn, has subfolders of its own. These subfolders are contained in its SubFolders property, which is itself an ISWiFolders collection. Continuing the example above, you can now create a copy of the object for the Start menu, which is a subfolder of the taskbar in the Shortcuts explorer:

    Set m_pFolder = m_pFolder.SubFolders("[StartMenuFolder]")

We can go ever farther with this example and get a copy of the folder MyProgFolder under the Programs menu:

    Set m_pFolder = m_pFolder.SubFolders("[ProgramMenuFolder]").SubFolders("MyProgFolder")

Members

ISWiFolders Collection Members

Name

Type

Description

Count

Read-Only Property

Use this property to return the total number of elements in the ISWiFolders collection.

Item

Read-Only Property

Provide the index number or name of the folder in order to retrieve the ISWiFolder object.

Item is the default property for ISWiFolders, which means that m_ISWiComponent.ISWiFolders.Item("[DesktopFolder]") is equivalent to m_ISWiComponent.ISWiFolders("[DesktopFolder]").

Applies To

ISWiComponent