Click here to Skip to main content
13,048,406 members (120,429 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 bookmarked
Posted 8 Sep 2010

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;


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

You may also be interested in...


Comments and Discussions

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