Skip to content

SourceMediaList Class

A list of source media for an installed product or patch.

MethodDescription
Add()Adds or updates a disk of the media source for the product or patch.
Clear()Removes all source media from the list.
Contains(diskId)Checks if the specified media disk id exists in the list.
CopyTo(array, arrayIndex)Copies the source media info from this list into an array.
GetEnumerator()Enumerates the source media in the source list of the patch or product installation.
Remove(diskId)Removes a specified disk from the set of registered disks.
PropertyDescription
CountGets the number of source media in the list.
IsReadOnlyGets a boolean value indicating whether the list is read-only. A SourceMediaList is never read-only.
WixToolset.Dtf.WindowsInstaller.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8

Adds or updates a disk of the media source for the product or patch.

public void Add()

Win32 MSI API: MsiSourceListAddMediaDisk

Removes all source media from the list.

public void Clear()

Win32 MSI API: MsiSourceListClearAllEx

Checks if the specified media disk id exists in the list.

public bool Contains(
int diskId
)
ParameterTypeDescription
diskIdintdisk id of the media to look for

bool true if the media exists in the list, false otherwise

Copies the source media info from this list into an array.

public void CopyTo(
MediaDisk[] array,
int arrayIndex
)
ParameterTypeDescription
arrayMediaDisk[]destination array to be filed
arrayIndexintoffset into the destination array where copying begins

Enumerates the source media in the source list of the patch or product installation.

public IEnumerator<WixToolset.Dtf.WindowsInstaller.MediaDisk> GetEnumerator()

Win32 MSI API: MsiSourceListEnumMediaDisks

Removes a specified disk from the set of registered disks.

public bool Remove(
int diskId
)
ParameterTypeDescription
diskIdintID of the disk to remove

Win32 MSI API: MsiSourceListClearMediaDisk

Gets the number of source media in the list.

public int Count { get; set; }

Gets a boolean value indicating whether the list is read-only. A SourceMediaList is never read-only.

public bool IsReadOnly { get; set; }