I want to check what type of operating system i use and what kind of processor. this should be check on run time. i tried using
System.Environment.GetEnvironment
Look at the ManagementClass class: http://msdn.microsoft.com/en-us/library/system.management.managementclass.aspx
var mgmt = new ManagementClass("Win32_OperatingSystem");
foreach (ManagementObject mgmtObj in mgmt.GetInstances())
{
// Just get first value.
return mgmtObj[info.Information].ToString().Trim();
}