MSFN Forum: detecting hardware type from 32-bit WinPE? - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

detecting hardware type from 32-bit WinPE? Rate Topic: -----

#1 User is offline   pankajtakawale 

  • Junior
  • Pip
  • Group: Members
  • Posts: 53
  • Joined: 02-December 06

Posted 08 January 2007 - 11:25 PM

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)


#2 User is offline   Jazkal 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 590
  • Joined: 16-January 04

Posted 09 January 2007 - 11:28 AM

which version of WinPE? v1.6 or 2.0?

#3 User is offline   pankajtakawale 

  • Junior
  • Pip
  • Group: Members
  • Posts: 53
  • Joined: 02-December 06

Posted 09 January 2007 - 10:27 PM

View PostJazkal, on Jan 9 2007, 11:28 PM, said:

which version of WinPE? v1.6 or 2.0?


2.0

#4 User is offline   Jazkal 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 590
  • Joined: 16-January 04

Posted 10 January 2007 - 07:54 AM

Have you tried looking at a devcon output?

devcon find *

#5 User is offline   pankajtakawale 

  • Junior
  • Pip
  • Group: Members
  • Posts: 53
  • Joined: 02-December 06

Posted 11 January 2007 - 02:00 AM

View PostJazkal, on Jan 10 2007, 07:54 PM, said:

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.

#6 User is offline   pringtef 

  • Group: Members
  • Posts: 3
  • Joined: 16-December 03

Posted 11 January 2007 - 07:01 AM

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

#7 User is offline   pankajtakawale 

  • Junior
  • Pip
  • Group: Members
  • Posts: 53
  • Joined: 02-December 06

Posted 12 January 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.

#8 User is offline   Br4tt3 

  • World famous sausage eater...
  • PipPipPipPip
  • Group: Members
  • Posts: 566
  • Joined: 20-April 04

Posted 12 January 2007 - 08:12 AM

View Postpankajtakawale, on Jan 12 2007, 03:22 AM, said:

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

This post has been edited by Br4tt3: 12 January 2007 - 08:15 AM


#9 User is offline   pankajtakawale 

  • Junior
  • Pip
  • Group: Members
  • Posts: 53
  • Joined: 02-December 06

Posted 14 January 2007 - 01:39 AM

View PostBr4tt3, on Jan 12 2007, 08:12 PM, said:

View Postpankajtakawale, on Jan 12 2007, 03:22 AM, said:

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.

#10 User is offline   pringtef 

  • Group: Members
  • Posts: 3
  • Joined: 16-December 03

Posted 15 January 2007 - 05:24 AM

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?

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy