SetStream Method (fieldName, filePath)

Microsoft Deployment Tools

Deployment Tools Foundation SetStream Method (fieldName, filePath)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerRecordSetStream(String, String)
Sets a record stream field from a file. Stream data cannot be inserted into temporary fields.
Declaration Syntax
C# Visual Basic Visual C++
public void SetStream(
	string fieldName,
	string filePath
)
Public Sub SetStream ( _
	fieldName As String, _
	filePath As String _
)
public:
void SetStream(
	String^ fieldName, 
	String^ filePath
)
Parameters
fieldName (String)
Specifies the field name of the Record to set.
filePath (String)
Specifies the path to the file containing the stream.
Remarks

The contents of the specified file are read into a stream object. The stream persists if the Record is inserted into the Database and the Database is committed. To reset the stream to its beginning you must pass in null for filePath. Do not pass an empty string, "", to reset the stream.

Setting a stream with this method is more efficient than setting a field to a FileStream object.

Exceptions
Exception Condition
ArgumentOutOfRangeException The field name does not match any of the named fields in the Record.

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller) Version: 3.0.0.0 (3.5.1623.0)