SoftwareLicensingProduct in WMI C#

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