Click here to Skip to main content
11,408,708 members (64,780 online)
Click here to Skip to main content

Tagged as

Checking Windows architecture using WMI

, 18 Sep 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
Check if windows is 64 or 32 bit using WMI
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;

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Pawel Gielmuda
Software Developer ABB
Poland Poland
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150414.5 | Last Updated 18 Sep 2010
Article Copyright 2010 by Pawel Gielmuda
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid