Help - Search - Members - Calendar
Full Version: detecting hardware type from 32-bit WinPE?
MSFN Forums > Unattended Windows Discussion & Support > Windows PE

   


Google Internet Forums Unattended CD/DVD Guide
pankajtakawale
How to detect whether 32bit WinPE is running on 32-bit or 64-bit processor?
I tried GetSystemInfo, but it returns me INTEL_PENTIUM_PROCESSOR for both cases (32/64 bit h/w)
Jazkal
which version of WinPE? v1.6 or 2.0?
pankajtakawale
QUOTE (Jazkal @ Jan 9 2007, 11:28 PM) *
which version of WinPE? v1.6 or 2.0?


2.0
Jazkal
Have you tried looking at a devcon output?

devcon find *
pankajtakawale
QUOTE (Jazkal @ Jan 10 2007, 07:54 PM) *
Have you tried looking at a devcon output?

devcon find *


On my 32 bit machine - devcon reports

ACPI\GENUINEINTEL_-_X86_FAMILY_15_MODEL_4

& On 64 bit, it reports -

ACPI\GENUINEINTEL_-_X86_FAMILY_15_MODEL_6

I dont think model number can be used to differentiate between 32 & 64 bit arch.
pringtef
Make sure you've the WMI and scripting packages installed, and then you can use a variation on this script to identify if it is 32 or 64 bit.

On Error Resume Next

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20


Set objWMIService = GetObject("winmgmts:\\" & "." & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT AddressWidth FROM Win32_Processor", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)

For Each objItem In colItems
wScript.Echo "AddressWidth: " & objItem.AddressWidth

Next
pankajtakawale
I havent tried this on WinPE.
I tried browsing Win32_Processor:AddressWidth on:

32 bit Win2k3 OS installed on 64-bit hardware. (AddressWidth is 32 here)
64-bit Win2K3 OS installed on 64-bit hardware. (AddressWidth is 64 here)

So I dont think I can retrieve actual arch of processor if 32bit WinPE is running on 64bit processor using WMI technique.
Br4tt3
QUOTE (pankajtakawale @ Jan 12 2007, 03:22 AM) *
I havent tried this on WinPE.
I tried browsing Win32_Processor:AddressWidth on:

32 bit Win2k3 OS installed on 64-bit hardware. (AddressWidth is 32 here)
64-bit Win2K3 OS installed on 64-bit hardware. (AddressWidth is 64 here)

So I dont think I can retrieve actual arch of processor if 32bit WinPE is running on 64bit processor using WMI technique.


I dont really get that.... unless you are running on ia64 (itanium = pure 64) which is not very common, the x86/x64 compatible processors are determined by the actual operating system runnin ontop of it, it is the same processor, just depending on the OS, then bit width will be either 32 or 64.... then should not WMI work? It seems to do the trick for me. I also read the Win32_Processor AddressWidth property to resolve WMI filters and stuff...
pankajtakawale
QUOTE (Br4tt3 @ Jan 12 2007, 08:12 PM) *
QUOTE (pankajtakawale @ Jan 12 2007, 03:22 AM) *
I havent tried this on WinPE.
I tried browsing Win32_Processor:AddressWidth on:

32 bit Win2k3 OS installed on 64-bit hardware. (AddressWidth is 32 here)
64-bit Win2K3 OS installed on 64-bit hardware. (AddressWidth is 64 here)

So I dont think I can retrieve actual arch of processor if 32bit WinPE is running on 64bit processor using WMI technique.


I dont really get that.... unless you are running on ia64 (itanium = pure 64) which is not very common, the x86/x64 compatible processors are determined by the actual operating system runnin ontop of it, it is the same processor, just depending on the OS, then bit width will be either 32 or 64.... then should not WMI work? It seems to do the trick for me. I also read the Win32_Processor AddressWidth property to resolve WMI filters and stuff...


I've installed 32 bit windows OS (w2k3) on 64 bit processor.
WMI browser shows me 32 bit address width for processor. (WMI browser is a WMI Server Repository tool)
I could not find a single technique to know actual processor type (32/64) when running 32 bit OS on 64 bit processor.
pringtef
One other option you could try would be to extract the Caption value from Win32_Processor, and compare Family, Model, and Stepping values against a table of processors to identify this?




Google Internet Forums Unattended CD/DVD Guide

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.