+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 18
Scripts Thread, determine if a pc's processor is x64 capable in Coding and Web Development; Does anyone know of a way i can run a script to determine if a processor in a pc is ...
  1. #1


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,647
    Thank Post
    229
    Thanked 865 Times in 743 Posts
    Rep Power
    297

    determine if a pc's processor is x64 capable

    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

  2. #2

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,811
    Thank Post
    3,327
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365
    language agnostic - How can I discover whether my CPU is 32 or 64 bits? - Stack Overflow

    Code:
    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 ?
    Last edited by mac_shinobi; 27th March 2013 at 10:46 AM.

  3. #3
    jamesfed's Avatar
    Join Date
    Sep 2009
    Location
    Reading
    Posts
    2,208
    Thank Post
    137
    Thanked 345 Times in 291 Posts
    Rep Power
    87
    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...

  4. #4

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,262
    Thank Post
    242
    Thanked 1,572 Times in 1,252 Posts
    Rep Power
    340
    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.

  5. Thanks to Michael from:

    mac_shinobi (27th March 2013)

  6. #5


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    Code:
    grep lm /proc/cpuinfo

  7. #6

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,811
    Thank Post
    3,327
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365
    Quote Originally Posted by CyberNerd View Post
    Code:
    grep lm /proc/cpuinfo
    Where are you running that command and do you need to install grep or what exactly ?

  8. #7


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    Quote Originally Posted by mac_shinobi View Post
    Where are you running that command and do you need to install grep or what exactly ?
    linux cli

  9. #8

    3s-gtech's Avatar
    Join Date
    Mar 2009
    Location
    Wales
    Posts
    2,827
    Thank Post
    146
    Thanked 573 Times in 517 Posts
    Rep Power
    154
    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).

  10. #9


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,647
    Thank Post
    229
    Thanked 865 Times in 743 Posts
    Rep Power
    297
    Quote Originally Posted by Michael View Post
    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)

  11. #10

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,811
    Thank Post
    3,327
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365
    For me it prompted x64 and my pc is using a 32 bit os

  12. #11


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,647
    Thank Post
    229
    Thanked 865 Times in 743 Posts
    Rep Power
    297
    Quote Originally Posted by mac_shinobi View Post
    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)

  13. #12

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,811
    Thank Post
    3,327
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365
    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

    Last edited by mac_shinobi; 27th March 2013 at 01:24 PM.

  14. Thanks to mac_shinobi from:

    sted (27th March 2013)

  15. #13


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,647
    Thank Post
    229
    Thanked 865 Times in 743 Posts
    Rep Power
    297
    Quote Originally Posted by mac_shinobi View Post
    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

  16. Thanks to sted from:

    mac_shinobi (27th March 2013)

  17. #14


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,647
    Thank Post
    229
    Thanked 865 Times in 743 Posts
    Rep Power
    297
    for what its worth (as e-mail isnt going towork (leeds learning notwork) and its not that urgent

    Code:
    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

  18. Thanks to sted from:

    mac_shinobi (27th March 2013)

  19. #15

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,811
    Thank Post
    3,327
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365
    Quote Originally Posted by sted View Post
    for what its worth (as e-mail isnt going towork (leeds learning notwork) and its not that urgent

    Code:
    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 ?

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. PC Pro - OpenSource is no good for schools?
    By Ric_ in forum General Chat
    Replies: 60
    Last Post: 21st August 2012, 12:16 PM
  2. How to determine if a HP good is a grey import?
    By localzuk in forum Hardware
    Replies: 3
    Last Post: 30th January 2011, 03:30 PM
  3. automatic VNC to PC a user is logged onto
    By ChrisP in forum How do you do....it?
    Replies: 2
    Last Post: 7th December 2007, 04:23 PM
  4. Replies: 0
    Last Post: 27th September 2007, 08:11 PM
  5. Shutdown batch script stalls if 1 PC is shut down
    By PrimaryTech in forum Scripts
    Replies: 8
    Last Post: 7th July 2007, 06:04 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •