Jitesh Byahut 2/16/2014 1947

Win32_PageFileSetting in WMI C# Asp.Net

Here we are retrieving Page File Setting details of Computer.

Use namespace System.Management

using System.Management;

 

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

{

    protected void Page_Load(object sender, EventArgs e)

    {

   ManagementObjectSearcher objpagefile = new ManagementObjectSearcher("select * from win32_PageFile");

 

        foreach (ManagementObject obj in objpagefile.Get())

        {

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

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

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

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

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

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

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

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

        }

    }

}



Please give your feedback for improving this page