Insert Method (item, index)

Microsoft Deployment Compression & Installer

Copy image CopyHover image
Deployment Tools Foundation Insert Method (item, index)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerSourceListInsert(String, Int32)
Adds or reorders a network or URL source for the product or patch.
Declaration Syntax
C# Visual Basic Visual C++
public void Insert(
	string item,
	int index
)
Public Sub Insert ( 
	item As String,
	index As Integer
)
public:
void Insert(
	String^ item, 
	int index
)
Parameters
item (String)
Path to the source to be added. This parameter is expected to contain only the path without the filename.
index (Int32)
Specifies the priority order in which the source will be inserted
Remarks

If this method is called with a new source and index is set to 0, the installer adds the source to the end of the source list.

If this method is called with a source already existing in the source list and index is set to 0, the installer retains the source's existing index.

If the method is called with an existing source in the source list and index is set to a non-zero value, the source is removed from its current location in the list and inserted at the position specified by Index, before any source that already exists at that position.

If the method is called with a new source and Index is set to a non-zero value, the source is inserted at the position specified by index, before any source that already exists at that position. The index value for all sources in the list after the index specified by Index are updated to ensure unique index values and the pre-existing order is guaranteed to remain unchanged.

If index is greater than the number of sources in the list, the source is placed at the end of the list with an index value one larger than any existing source.

Win32 MSI API: MsiSourceListAddSourceEx

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.9.1006.0)