This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- FlexNet Connect
- :
- FlexNet Connect Knowledge Base
- :
- Getting a List of Registered Products when Using the Flexnet Connect .NET XT SDK
Subscribe
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Getting a List of Registered Products when Using the Flexnet Connect .NET XT SDK
Getting a List of Registered Products when Using the Flexnet Connect .NET XT SDK
Summary
Getting a List of Registered Products when Using the Flexnet Connect .NET XT SDK.Synopsis
Earlier versions of the FNC Windows Agent provided an EnumProducts() API to query those products which were registered with Flexnet Connect. This API is no longer available in the .NET XT SDK.. This article provides sample code which can be used to get a list of registered products.Discussion
When using the XT SDK's, all registered products are stored in a single file named productConfig.xml... In older agents, each product had a separate registration file... In order to determine a list of registered products, it will be necessary to parse the productConfig.xml file to get a list of product codes.. The following code blurb shows how this might be done:private static IProduct product;
private static IConnect connectClient;
private static string myProduct = "{78AAAEA6-CB8D-4F0E-9E6B-3C378CD921A6}"; //Enter a registered product code
product = connectClient.GetProduct(myProduct);
XmlDocument doc = new XmlDocument();
doc.Load(connectClient.StoragePath + "\\productconfig.xml");
XmlNodeList elemList = doc.GetElementsByTagName("Collection");
for (int i = 0; i < elemList.Count; i++)
{
string attrVal = elemList.Attributes["id"].Value;
Console.WriteLine(attrVal);
}
100% helpful
(1/1)