Jump to content
Sign in to follow this  
NMD2W

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

Recommended Posts

NMD2W

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

Share this post


Link to post
Share on other sites
November

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]

Share this post


Link to post
Share on other sites
NMD2W

THANKS 4 D HELP.....

I'M SORRY... 4 LATE, COZ, ACTUALLY IM DOING THIS PART TIME. U KNOW... IM A CIVIL ENGINEER.....!!!!

Share this post


Link to post
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
Sign in to follow this  

×