How to get the activated computers for a given activation key
// make sure to strip out dashes from the activationKey
string activationKey = "AMTP0R0K00GHJ3K38N3Q1S17TX552TTFV3W8R8";
string dataSet = string.Empty;
string response = string.Empty;
license.GetDataSetEx(string.Empty, "qryLicenseInfo", "ActivationKey='" + activationKey + "'", ref dataSet, out response);
DataSet ds = new DataSet("NewDataSet");
XmlReader reader = new XmlTextReader(dataSet, XmlNodeType.Document, null);
if (!String.IsNullOrEmpty(dataSet))
{
ds.ReadXml(reader);
if (ds.Tables[0].Rows.Count > 0)
{
DataRowCollection drc = ds.Tables[0].Rows;
if (drc != null)
{
foreach (DataRow dr in drc)
{
string computerKey = dr["computerkey"].ToString();
string computerName = dr["computerName"].ToString();
string computerID = dr["computerID"].ToString();
}
}
}
}PreviousDistinguish between a trial and a subscriptionNextWhy is the license not stored (or deleted) at the machine level even if the user is an Administrator
Last updated