Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Determining OS type: 32-bit or 64-bit, programmatically.

Determining OS type: 32-bit or 64-bit, programmatically.

Scheduled Pinned Locked Moved C / C++ / MFC
csharpwindows-adminquestion
5 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eyalbi007
    wrote on last edited by
    #1

    Hi all, I need to determine during runtime whether I'm dealing with a 32-bit or 64-bit OS, in order to decide which .NET installation file to run. What's the way of knowing that? Is there a certain registry entry I should read in order to retrieve this information? Thanks, Eyal.

    G 1 Reply Last reply
    0
    • E eyalbi007

      Hi all, I need to determine during runtime whether I'm dealing with a 32-bit or 64-bit OS, in order to decide which .NET installation file to run. What's the way of knowing that? Is there a certain registry entry I should read in order to retrieve this information? Thanks, Eyal.

      G Offline
      G Offline
      Garth J Lancaster
      wrote on last edited by
      #2

      note sure about 32 vs 64 bit but these are a start :- http://www.codeproject.com/KB/system/XWinVer.aspx[^] http://www.codeproject.com/KB/system/osversion.aspx[^] 'g'

      E 1 Reply Last reply
      0
      • G Garth J Lancaster

        note sure about 32 vs 64 bit but these are a start :- http://www.codeproject.com/KB/system/XWinVer.aspx[^] http://www.codeproject.com/KB/system/osversion.aspx[^] 'g'

        E Offline
        E Offline
        eyalbi007
        wrote on last edited by
        #3

        Hi, After fast look, it seems like: The first link does not support 64-bit OS (e.g windows xp x64). The second is a C# project which I can't use since .NET framework is not installed - that's my project purpose: check if .net is installed, and if not - install it. Thanks!

        R G 2 Replies Last reply
        0
        • E eyalbi007

          Hi, After fast look, it seems like: The first link does not support 64-bit OS (e.g windows xp x64). The second is a C# project which I can't use since .NET framework is not installed - that's my project purpose: check if .net is installed, and if not - install it. Thanks!

          R Offline
          R Offline
          Robert M Greene
          wrote on last edited by
          #4

          Try this... http://blogs.msdn.com/oldnewthing/archive/2005/02/01/364563.aspx[^]

          ............................. Two words you don't ever want to hear. "Fix bayonets"

          1 Reply Last reply
          0
          • E eyalbi007

            Hi, After fast look, it seems like: The first link does not support 64-bit OS (e.g windows xp x64). The second is a C# project which I can't use since .NET framework is not installed - that's my project purpose: check if .net is installed, and if not - install it. Thanks!

            G Offline
            G Offline
            Garth J Lancaster
            wrote on last edited by
            #5

            if Robert's Link Doesnt give you what you want, there's a link/code in this blog :- http://blogs.msdn.com/astebner/archive/2004/09/18/231253.aspx[^] or this one right here in CP :- http://www.codeproject.com/KB/dotnet/DetectDotNet.aspx[^]

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups