1) System.OperatingSystem osInfo=System.Environment.OSVersion;
2) http://geekswithblogs.net/lorint/archive/2006/01/30/67654.aspx
3) string registryKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
using (Microsoft.Win32.RegistryKey key = Registry.LocalMachine.OpenSubKey(registryKey))
{
var query = from a in
key.GetSubKeyNames()
let r = key.OpenSubKey(a)
select new
{
Application = r.GetValue("DisplayName")
};
foreach (var item in query)
{
if (item.Application != null)
Console.WriteLine(item.Application);
}
}
( http://www.onedotnetway.com/get-a-list-of-installed-applications-using-linq-and-c/経由)
4)
Process[] processlist = Process.GetProcesses();
foreach(Process theprocess in processlist)
{
Console.WriteLine("Process: {0} ID: {1}", theprocess.ProcessName, theprocess.Id);
}