Click here to Skip to main content
12,452,721 members (52,323 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

5.8K views
1 bookmarked
Posted

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

You may also be interested in...

Pro
Pro

Comments and Discussions

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