Determining 64bit or 32bit architecture

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nobodyreally
    New Member
    • Nov 2009
    • 1

    Determining 64bit or 32bit architecture

    Hi have been looking forever for how to get the bit version of current RUNNING OS in C#. There are lots of posts out there using the IntPtr.Size and Environment.Get EnvironmentVari able("PROCESSOR _ARCHITECTURE") but these return what your software is running in (compiled to if other than AnyCPU) regardless of what the OS is running.

    I knew I would find it in the win32 but could not figure out where.

    Thanks for pointing to the date which allowed me to find the OSArchitecture.

    Yep! I'm happy!

    Cheers!
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    (EDIT: I swear the post was different when I split them)

    I would have thought you wanted Win32_Processor and then look at AddressWidth? I only have 32bit computers to test it on, but that object should have what you need?

    MODERATOR

    Comment

    Working...