Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Currently looking at deployment options for Windows 7. One of the questions we're looking into is 32 bit vs 64 bit. I'm trying to run a SCCM report against our estate to identify which machines are 64-bit capable (whether or not they're currently running a 64-bit OS).

There seem to be a few resources out on the net for this (here, here and here) but none of them seem to work right on machines running 32-bit Windows XP. 32-bit XP machines seem to always report that they're running on 32-bit hardware.

The query I'm currently running is:

select sys.netbios_name0, sys.Operating_System_Name_and0 as OperatingSystem, 
case when pr.addresswidth0=64 then '64bit OS'
when pr.addresswidth0=32 then '32bit OS'
end as [Operating System Type],
case when pr.DataWidth0=64 then '64bit Processor'
when pr.DataWidth0=32 then '32bit Processor'
end as [Processor Type],
case when pr.addresswidth0=32 and pr.DataWidth0=64 then 'YES'
end as [32-bit OS on x64 processor]
from v_r_system sys
join v_gs_processor pr on sys.resourceid=pr.resourceid

I've also tried this, which reports all "Windows XP Professional" systems are on "X86-based PC", not x64 based even though a number of them definitely are:

select
    OS.Caption0,
    CS.SystemType0,
    Count(*)
from
    dbo.v_GS_COMPUTER_SYSTEM CS Left Outer Join dbo.v_GS_OPERATING_SYSTEM OS on CS.ResourceID = OS.ResourceId
Group by
    OS.Caption0,
    CS.SystemType0
Order by
    OS.Caption0,
    CS.SystemType0

For instance we have a set of Dell Latitude E4200 laptops. Some of these are running 32-bit Windows XP SP3, some of them are running 32-bit Windows 7, some are running 64-bit Windows 7. All the laptops are identical, having come from the same order. Out of these the Windows 7 (32 and 64-bit) report that the hardware is 64-bit capable, and the Windows XP machines report that they're only 32-bit capable.

Does anyone know if there's another value I can query to get the hardware's capabilities correctly on XP, or is there a hotfix that will get it reporting the correct info?

share|improve this question
    
Just note that you will find very few 63-bit computers on your network :) –  Lasse V. Karlsen Mar 29 '10 at 10:43
    
Lol oops, well at least it was only mis-typed in my description, not the actual queries :) –  GAThrawn Mar 29 '10 at 14:10
add comment

1 Answer

up vote 1 down vote accepted

I had a feeling that posting on here would be what made me find the actual answer myself!

Have found a property of the system processor that seems to answer the question exactly right on all OS's I've tested with (server & workstation from XP/2003 up). What I have is v_GS_PROCESSOR.Is64Bit0 which gives a 1 or a 0 depending on whether or not the CPU is 64-bit capable.

My SCCM queries now are (for a top-down summary):

select
    OS.Caption0,
    case when pr.Is64Bit0=1 then '64-bit'
    when pr.Is64Bit0=0 then '32-bit'
    end as [Processor Type],
    Count(*)
from
    dbo.v_gs_processor PR Left Outer Join dbo.v_GS_OPERATING_SYSTEM OS on PR.ResourceID = OS.ResourceId
Group by
    OS.Caption0,
    pr.Is64Bit0
Order by
    OS.Caption0,
    pr.Is64Bit0

And (for the machine by machine listing):

select sys.netbios_name0, sys.Operating_System_Name_and0 as OperatingSystem, 
case when pr.Is64Bit0=1 then 'Yes 64-bit'
when pr.Is64Bit0=0 then 'No 32-bit'
end as [Processor Is 64-Bit?],
case when pr.addresswidth0=64 then '64-bit OS'
when pr.addresswidth0=32 then '32-bit OS'
end as [Operating System Type],
case when pr.DataWidth0=64 then '64-bit Processor'
when pr.DataWidth0=32 then '32-bit Processor'
end as [Processor Type (XP Lies)],
case when pr.addresswidth0=32 and pr.Is64Bit0=1 then 'YES'
end as [32-bit OS on x64 processor]
from v_r_system sys
join v_gs_processor pr on sys.resourceid=pr.resourceid
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.