using System;
using System.Management;
Code:
static void Main(string[] args)
{
WqlObjectQuery query = new WqlObjectQuery("Select * from Win32_Environment");
ManagementObjectSearcher find = new ManagementObjectSearcher(query);
Console.WriteLine("Description - Name - User Name - Value");
foreach (ManagementObject mo in find.Get())
{
Console.WriteLine(mo["Description"] + " - " + mo["Name"] + " - " + mo["UserName"] + " - " + mo["VariableValue"]);
}
}
0 comments:
Post a Comment