Jitesh Byahut 2/16/2014 2704

Win32_Product in WMI C# Asp.Net

Here we are retrieving Products details of Computer.

Use namespace System.Management

using System.Management;

 

public partial class Win_Win32_Product : System.Web.UI.Page

{

    protected void Page_Load(object sender, EventArgs e)

    {

     ManagementObjectSearcher objproduct = new ManagementObjectSearcher("select * from Win32_Product");

 

        foreach (ManagementObject obj in objproduct.Get())

        {

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

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

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

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

        }

    }

}

Demo

View output :

demoimage


Please give your feedback for improving this page