Jump to content

Please, how to identify the machine whether it single processor or multi processor with auto it script..?


Recommended Posts

Please, how to identify the machine whether it single processor or multi processor with auto it script..?

is it possible?

plz, any one help...

thanks in advance...

Hi there,

One method is to use WMI:

$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20
$colItems = ""
$strComputer = "localhost"

$Output=""
$Output &= "Computer: " & $strComputer  & @CRLF
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Processor", "WQL", _
                                          $wbemFlagReturnImmediately + $wbemFlagForwardOnly)

If IsObj($colItems) then
   For $objItem In $colItems
      $Output &= "Architecture: " & $objItem.Architecture & @CRLF
      $Output &= "Caption: " & $objItem.Caption & @CRLF
      $Output &= "CurrentClockSpeed: " & $objItem.CurrentClockSpeed & @CRLF
      $Output &= "Description: " & $objItem.Description & @CRLF
      $Output &= "Family: " & $objItem.Family & @CRLF
      $Output &= "L2CacheSize: " & $objItem.L2CacheSize & @CRLF
      $Output &= "L3CacheSize: " & $objItem.L3CacheSize & @CRLF
      $Output &= "Level: " & $objItem.Level & @CRLF
      $Output &= "Manufacturer: " & $objItem.Manufacturer & @CRLF
      $Output &= "MaxClockSpeed: " & $objItem.MaxClockSpeed & @CRLF
      $Output &= "Name: " & $objItem.Name & @CRLF
      $Output &= "NumberOfCores: " & $objItem.NumberOfCores & @CRLF
      $Output &= "NumberOfLogicalProcessors: " & $objItem.NumberOfLogicalProcessors & @CRLF
      $Output &= "ProcessorId: " & $objItem.ProcessorId & @CRLF
      $Output &= "ProcessorType: " & $objItem.ProcessorType & @CRLF
      $Output &= "Revision: " & $objItem.Revision & @CRLF

   Next
   ConsoleWrite($Output)

Else
   Msgbox(0,"WMI Output","No WMI Objects Found for class: " & "Win32_Processor" )
Endif


Func WMIDateStringToDate($dtmDate)

    Return (StringMid($dtmDate, 5, 2) & "/" & _
    StringMid($dtmDate, 7, 2) & "/" & StringLeft($dtmDate, 4) _
    & " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate,13, 2))
EndFunc

Check this link for more info.

Cheers

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

  • 4 weeks later...

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