Jitesh Byahut 2/16/2014 2155

SoftwareLicensingProduct in WMI C# Asp.Net

Here we are retrieving all licensing software product details of Computer.

Use namespace System.Management

ManagementObjectSearcher soft =

                                                            new ManagementObjectSearcher("select * from SoftwareLicensingProduct"); 

        foreach (ManagementObject obj in soft.Get())

        {

            Response.Write("Name  -    " + obj["Name"] + "</br>");

            Response.Write("LicenseFamily  -  " + obj["LicenseFamily"] + "</br>");

            Response.Write("LicenseStatus  -  " + obj["LicenseStatus"] + "</br>");

            Response.Write("GracePeriodRemaining  -  " + obj["GracePeriodRemaining"] + "</br>");

            Response.Write("TrustedTime  -  " + obj["TrustedTime"] + "</br>");

            Response.Write("ProductKeyID  -  " + obj["ProductKeyID"] + "</br>");

            Response.Write("ProductKeyURL  -  " + obj["ProductKeyURL"] + "</br>");

            Response.Write("UseLicenseURL  -  " + obj["UseLicenseURL"] + "</br>");

            Response.Write("PartialProductKey  -  " + obj["PartialProductKey"] + "</br></br>");

        }

Demo

View output :


demo image


Please give your feedback for improving this page