sted Posted March 27, 2013 Posted March 27, 2013 Does anyone know of a way i can run a script to determine if a processor in a pc is x64 capable? All the ones ive found report as being x86 even when cpuz reports them as x64 as does pxe booting it will show x64 boot images
mac_shinobi Posted March 27, 2013 Posted March 27, 2013 (edited) language agnostic - How can I discover whether my CPU is 32 or 64 bits? - Stack Overflow Const PROCESSOR_ARCHITECTURE_X86 = 0 Const PROCESSOR_ARCHITECTURE_IA64 = 6 Const PROCESSOR_ARCHITECTURE_X64 = 9 strComputer = "." Set oWMIService = GetObject("winmgmts:" & _ "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colProcessors = oWMIService.ExecQuery("SELECT * FROM Win32_Processor") For Each oProcessor In colProcessors Select Case oProcessor.Architecture Case PROCESSOR_ARCHITECTURE_X86 ' 32-bit msgbox "The Processor on this machine is : x86 / 32 bit capable" Case PROCESSOR_ARCHITECTURE_X64, PROCESSOR_ARCHITECTURE_IA64 ' 64-bit msgbox "The Processor on this machine is : x64 / 64 bit capable" Case Else ' other msgbox "An error has occured" End Select Next Am not sure which ones you have tried already but this is the one I have found, easy enough to adjust the script above to make it message box or prompt you where the comments are ie ' 64 bit ( the apostrophe is used to comment out a line in vbscript ) , so replace that with either a wscript.echo "Message to Display" or msgbox "Message to Display" Edit : There were other scripts I found that used the Operating System Class in vbscript etc but not sure when you are running this etc. Are you wanting to check the CPU ref 32 or 64 bit or you want to check the currently installed OS to see if it is 32 or 64 bit ? Edited March 27, 2013 by mac_shinobi
jamesfed Posted March 27, 2013 Posted March 27, 2013 Every PC that runs Windows will be x86 because thats the instruction set a PC uses, you want to see if a PC is x86-32 or x86-64. Now if you ran the same test on a Windows RT tablet you would find its ARM-32...
Michael Posted March 27, 2013 Posted March 27, 2013 Any PC which is 10 years old or newer should support 64Bit instructions as a general guide. Since 2004 ish Pentium 4 processors or later included 64Bit instructions. 1
mac_shinobi Posted March 27, 2013 Posted March 27, 2013 grep lm /proc/cpuinfo Where are you running that command and do you need to install grep or what exactly ?
CyberNerd Posted March 27, 2013 Posted March 27, 2013 Where are you running that command and do you need to install grep or what exactly ? linux cli
3s-gtech Posted March 27, 2013 Posted March 27, 2013 AMD processors since A64 and Intel mainstream since Prescott F/Core 2 have supported x86-64 (the original Core series do not, older Atom stuff doesn't).
sted Posted March 27, 2013 Author Posted March 27, 2013 Any PC which is 10 years old or newer should support 64Bit instructions as a general guide. Since 2004 ish Pentium 4 processors or later included 64Bit instructions. ive got a suite of older pcs they all look the same some are p4 i know are x64 some are celeron and x64 some are celeron and x86 @mac_shinobi that looks very similar if not identicalto a script id tried just returns x86 even though its an x64 cpu (unless the pcs is running an x64 os)
mac_shinobi Posted March 27, 2013 Posted March 27, 2013 For me it prompted x64 and my pc is using a 32 bit os
sted Posted March 27, 2013 Author Posted March 27, 2013 For me it prompted x64 and my pc is using a 32 bit os nope just saved it as a vbs and it just says x86. cpuz says em64t (and as its a p4 3.06 should be x64)
mac_shinobi Posted March 27, 2013 Posted March 27, 2013 (edited) Found this. Would this be an option - you can edit the bat file so it creates the report only and if you want it emailed to you then that's a brucey bonus http://www.techienote.com/2010/07/generating-report-via-cpuz-and-sending-it-to-your-email-id.html Edited March 27, 2013 by mac_shinobi 1
sted Posted March 27, 2013 Author Posted March 27, 2013 Found this. Would this be an option - you can edit the bat file so it creates the report only and if you want it emailed to you then that's a brucey bonus Generating report via CPUZ and sending it to your email id seems to work thanks 1
sted Posted March 27, 2013 Author Posted March 27, 2013 for what its worth (as e-mail isnt going towork (leeds learning notwork) and its not that urgent if exist c:\cpuz\%computername%.txt goto end md c:\cpuz xcopy "\\server\packages$\cpuz\*.*" "c:\cpuz\*.*" /c/e/h/y/s c:\cpuz\cpuz --txt=c:\cpuz\%computername% copy c:\cpuz\%computername%.txt "\\server\logs$\cpuz\ :end 1
mac_shinobi Posted March 27, 2013 Posted March 27, 2013 for what its worth (as e-mail isnt going towork (leeds learning notwork) and its not that urgent if exist c:\cpuz\%computername%.txt goto end md c:\cpuz xcopy "\\server\packages$\cpuz\*.*" "c:\cpuz\*.*" /c/e/h/y/s c:\cpuz\cpuz --txt=c:\cpuz\%computername% copy c:\cpuz\%computername%.txt "\\server\logs$\cpuz\ :end Did you adjust / tweak the ini file as per the site ? If not then where are you looking for the cpu info ref it supporting 64 bit etc ?
sted Posted March 27, 2013 Author Posted March 27, 2013 (edited) Did you adjust / tweak the ini file as per the site ? If not then where are you looking for the cpu info ref it supporting 64 bit etc ? yes i just dumped their inifile but tbh not sure its needed (just tried it makes no odds) ,ight be different if you want pretty html i dont lol Instructions sets MMX, SSE, SSE2, SSE3, EM64T Edited March 27, 2013 by sted 1
chazzy2501 Posted March 27, 2013 Posted March 27, 2013 this is a tiny program you can run to discover your cpu's ability. GRC|SecurAble: Determine Processor Security Features| 1
mac_shinobi Posted March 27, 2013 Posted March 27, 2013 (edited) EE link : Script to query remote 64bit CPU capabililites: WMI, Powershell, 64bit, remote Only allows you to view if you are registered with them and only gave me one free view, so copying and pasting a bit : Using : chkcpu - CPU Identification utility psexec ( may need to use an earlier version of psexec ) - http://technet.microsoft.com/en-gb/sysinternals/bb897553.aspx I think psexec is now apart of pstools, but if you have issues with psexec might be worth while downloading or getting an earlier version of it. I just found out that this is an issue with the current version of psexec (1.95) and it now works using a previous version instead so what would be really handy now is a simple way to parse the generated example output below from vbscript in a grep-like manner since only the 64-bit flag is of interest. C:\Public>psexec \\remote -c chkcpu32 /v PsExec v1.72 - Execute processes remotely Copyright © 2001-2006 Mark Russinovich Sysinternals - www.sysinternals.com CPU Identification utility v2.04 © 1997-2009 Jan Steunebrink CPU Vendor and Model: Intel Xeon Dual-Core 5110-5160 B2-step Internal CPU speed : 2328.0 MHz Number of CPUs : 4 CPU-ID Vendor string: GenuineIntel CPU-ID Name string : Intel® Xeon® CPU 5140 @ 2.33GHz CPU-ID Signature : 0006F6 CPU Features : Floating-Point Unit on chip: Yes Time Stamp Counter : Yes MMX instruction set : Yes 3DNow! instruction set : No Streaming SIMD Extensions : Yes SSE2 support : Yes SSE3 support : Yes Hyper-Threading Technology : No Execute Disable protection : Yes 64-bit support : Yes Virtualization Technology : Yes Size of L1 cache : 64 KB Integrated L2 cache : 4096 KB Integrated L3 cache : None chkcpu32.exe exited on danny with error code 0 Ok so here is the script that uses chkcpu32 and psexec and gives you results in the prompt. It can be modified of course to do mass checks but use this for testing: NOTE: script assumes that both PSEXEC and CHKCPU32 programs are in C:\Windows\System32, and if they are not please put them there. Test it and let me know: Set oWS = CreateObject("WScript.Shell") Set oFS = CreateObject("Scripting.FileSystemObject") sComputer = "ComputerNameHere" sScriptName = WScript.ScriptName sScriptPath = WScript.ScriptFullName sTemp = Replace(sScriptName, ".vbs", ".txt") sTempFile = Replace(sScriptPath, sScriptName, sTemp) oWS.Run "cmd.exe /c psexec \\" & sComputer & " -c C:\Windows\System32\chkcpu32 /v >" & Chr(34) & sTempFile & chr(34),0 ,True Set oTempFile = oFS.OpenTextFile(sTempFile, 1) Do While oTempFile.AtEndOfStream <> True sText = oTempFile.ReadLine If Instr(sText, "64-bit support") Then sText = LCase(sText) If InStr(sText, "no") Then oWS.Popup "CPU with 64-bit support NOT detected", ,sComputer , vbExclamation Else oWS.Popup "CPU with 64-bit support DETECTED!", ,sComputer , vbInformation End If Exit Do End If Loop oTempFile.Close oFS.DeleteFile(sTempFile) Easier way instead of using the above vbs is to have chkcpu32.exe in the same directory or the system32 directory and just have a bat file that pipes the output to a text file if you have a directory on your C: Drive named chkcpu32 with chkcpu32.exe and your own bat file you could do something like chkcpu32.exe /v > C:\chkcpu32\64bit.txt CPU Identification utility v2.11 © 1997-2013 Jan Steunebrink ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ CPU Vendor and Model: Intel Core i5 Quad i5-2300/2400/2500 series D2-step Internal CPU speed : 3093.0 MHz System CPU count : 1 Physical CPU(s), 4 Core(s) per CPU, 4 Thread(s) CPU-ID Vendor string: GenuineIntel CPU-ID Name string : Intel® Core i5-2400 CPU @ 3.10GHz CPU-ID Signature : 0206A7 CPU Features : Floating-Point Unit on chip : Yes Time Stamp Counter : Yes Enhanced SpeedStep Technology: Yes Hyper-Threading Technology : No Execute Disable protection : Yes 64-bit support : Yes Virtualization Technology : Yes Instr set extensions: MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2 Size of L1 cache : 4 x 64 KB Integrated L2 cache : 4 x 256 KB Integrated L3 cache : 6144 KB Edited March 27, 2013 by mac_shinobi
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now