Click here to Skip to main content
Click here to Skip to main content

Checking Windows architecture using WMI

, 18 Sep 2010
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)

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 | Mobile
Web03 | 2.8.140721.1 | Last Updated 18 Sep 2010
Article Copyright 2010 by Pawel Gielmuda
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid