Jump to content

detecting hardware type from 32-bit WinPE?


pankajtakawale
 Share

Recommended Posts


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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...

Edited by Br4tt3
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...