GetProducts Method (productCode, userSid, context)

DTF API

Copy image CopyHover image
Deployment Tools Foundation GetProducts Method (productCode, userSid, context)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerProductInstallationGetProducts(String, String, UserContexts)
Enumerates product installations based on certain criteria.
Declaration Syntax
C# Visual Basic Visual C++ F#
public static IEnumerable<ProductInstallation> GetProducts(
	string productCode,
	string userSid,
	UserContexts context
)
Public Shared Function GetProducts ( 
	productCode As String,
	userSid As String,
	context As UserContexts
) As IEnumerable(Of ProductInstallation)
public:
static IEnumerable<ProductInstallation^>^ GetProducts(
	String^ productCode, 
	String^ userSid, 
	UserContexts context
)
static member GetProducts : 
        productCode : string * 
        userSid : string * 
        context : UserContexts -> IEnumerable<ProductInstallation> 
Parameters
productCode (String)
ProductCode (GUID) of the product instances to be enumerated. Only instances of products within the scope of the context specified by the userSid and context parameters will be enumerated. This parameter may be set to null to enumerate all products in the specified context.
userSid (String)
Specifies a security identifier (SID) that restricts the context of enumeration. A SID value other than s-1-1-0 is considered a user SID and restricts enumeration to the current user or any user in the system. The special SID string s-1-1-0 (Everyone) specifies enumeration across all users in the system. This parameter can be set to null to restrict the enumeration scope to the current user. When context is set to the machine context only, userSid must be null.
context (UserContexts)
Specifies the user context.
Return Value
IEnumerable<(Of <(<'ProductInstallation>)>)>
An enumeration of product objects for enumerated product instances.
Remarks

Win32 MSI API: MsiEnumProductsEx

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