Found the following code in VBScript.
Does anyone knows how to convert it to csharp?
If InStr(1, optionFlag, "c", vbTextCompare) > 0 Then
Dim component, components, client, clients, path
Set components = installer.Components : CheckError
message = "---Components in product " & productCode & "---"
For Each component In components
Set clients = installer.ComponentClients(component) : CheckError
For Each client In Clients
If client = productCode Then
path = installer.ComponentPath(productCode, component) : CheckError
message = message & vbNewLine & component & " = " & path
Exit For
End If
Next
Set clients = Nothing
Next
Set components = Nothing
Wscript.Echo message
End If
> Hi,
> Does anyone know how I can use the windows installer com object in order
> to retrieve a list of products and a list of installed components for a
> given product?
> Any sample would be greatly appreciated.
> Thanks.