in reply to Re: How to find out if it is 32bit or 64bit windows?
in thread How to find out if it is 32bit or 64bit windows?

Thanks, it works now.
  • Comment on Re^2: How to find out if it is 32bit or 64bit windows?

Replies are listed 'Best First'.
Re^3: How to find out if it is 32bit or 64bit windows?
by davido (Cardinal) on Jun 22, 2011 at 16:10 UTC

    Are you sure? It seems to me it's reporting the CPU bitness, not the OS bitness. When I run your original test it still reports bitness as '0'.

    I may be wrong but I don't believe it's safe to assume that CPU bitness == OS bitness.


    Dave

      I don't believe it's safe to assume that CPU bitness == OS bitness.

      You cannot run a 64-bit build of an OS on a 32-bit processor.

      You can run a 32-bit build of an OS on an (intel) 64-bit processor, but that is done by running the CPU in 32-bit compatibility mode, when for all intents and purposes, it is a 32-bit processor. So, whilst it may be possible to distinguish between the two scenarios, there is little benefit in doing so as none of the 64-bit facilities would be available to you.

      Leastwise, none that I can think of.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        So the module returns 32-bit for a 64-bit CPU running a 32-bit OS?
      Hi davido,

      A couple of questions:

      • What's your Sys::Info::Driver::Windows::OS and Sys::Info and perl versions?
      • ActivePerl, Strawbery or your own build of perl?
      • What's your Windows version (XP, Vista, 7, etc)?
      • How did you install Sys::Info::Driver::Windows? (ppm, gcc, cl)?
      Thanks,
      Burak

        • $Sys::Info::VERSION is 0.78
        • $Sys::Info::Driver::VERSION is 0.78.
        • perl -v => This is perl 5, version 12, subversion 2 (v5.12.2) built for MSWin32-x64-multi-thread.
        • Strawberry
        • Vista Home Premium 64 bit, service pack 2. Version 6.0.6002.
        • cpanm was my installation tool.
        • I verified Sys::Info::Driver::Windows is also 0.78.

        Strawberry Perl includes a 'gcc' C compiler with it so that modules can be installed through traditional means rather than relying on ppm packages. cpanm would have invoked the gcc compiler.


        Dave