This code snippet requires reference to
System.Management
DLL:
var obj = new ManagementObjectSearcher("Select * FROM Win32_OperatingSystem");
var col = obj.Get();
foreach (var mgn in col)
{
string arch = mgn["OSArchitecture"].ToString();
return arch.Contains("64");
}
return false;