Creates an installation action that needs to be performed on a package during unattended Windows setup and adds it to the answer file. Namespace: Microsoft.ComponentStudio.ComponentPlatformInterface
Assembly: Microsoft.ComponentStudio.ComponentPlatformInterface (in microsoft.componentstudio.componentplatforminterface.dll)

Usage

Visual Basic
Dim package As Package
Dim createOption As CreateOptions
Dim returnValue As PackageAction
Dim packageActionCollection1 As PackageActionCollection
returnValue = packageActionCollection1.Create(package, createOption)

Syntax

Visual Basic
Overloads Public Function Create( _
		ByVal package As Package, _
		ByVal createOption As CreateOptions _
) As PackageAction
C#
public PackageAction Create(
		Package package, 
		CreateOptions createOption
);
C++
public:
PackageAction^ Create(
		Package^ package,
		CreateOptions createOption
);
J#
public PackageAction Create(
		Package package, 
		CreateOptions createOption
);
JScript
public function Create(
		 package : Package, 
		 createOption : CreateOptions
) : PackageAction;

Parameters

package

Instance of Package describing the package.

createOption

Enumeration element that determines whether to return the existing package action or throw an exception if one already exists.

Return Value

An instance of PackageAction.

Remarks

ArgumentNullException is thrown if id is null.

InvalidOperationException is thrown if there is already a package action for the package specified by id in the answer file, and createOption is FailIfExists.


Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Vista, and Windows 2000

Target Platforms

See Also