Win32_StartupCommand in WMI C#

Here we are retrieving Start up Commands details of Computer.

Use namespace System.Management

using System.Management;

 

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

{

    protected void Page_Load(object sender, EventArgs e)

    {

ManagementObjectSearcher objcomnd = new ManagementObjectSearcher( "select * from Win32_StartupCommand" );

 

        foreach (ManagementObject obj in objcomnd.Get())

        {

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

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

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

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

        }

    }

}

Demo

View output :

demoimage