Jump to content

Recommended Posts

Posted (edited)

@HeidiR

Nice job

Simple retrieving the information through the registry..

maybe add a processor list

http://www.intel.com/products/processor_number/index.htm

Some more information

http://msdn.microsoft.com/en-us/library/sy...essorcount.aspx

Small typos :

CPU-Architecturer -> Architecture

CPU-Derscription -> Description

Problem with IP Numbers

Example DNS 1) 000.000.000.000 2) 000.000.000.000 3) 000.000....

$TotalCores = EnvGet ("NUMBER_OF_PROCESSORS")

Best regards,

Emiel

Edited by Emiel Wieldraaijer

Best regards,Emiel Wieldraaijer

  • Replies 53
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted

You fix the processor misidentification by installing the patch from microsoft described here:

http://support.microsoft.com/kb/953955/

You can contact Microsoft through their webform and get the link to the patch sent via email.

Cheers

@Jotnar,

Correct but it will only fix Windows XP.. and msinfo retrieves the information correctly so HeidiR method is OK

My dual QuadCore Xeon is a Windows 2003 Enterprise

Best regards,Emiel Wieldraaijer

Posted

Hi All,

Thanks for the great feedback. I have added number of processor cores to the cpu section and corrected 2 typos in cpu section (Thanks Emiel). I appreciate everyone's willingness to make this a better tool!

The latest build can be found at the following link:

http://autoit.netfirms.com/public/

Enjoy!

HeidiRFind free applications, code examples and more on my site at:http://heidisdownloads.com/
Posted (edited)

@HeidiR

Another typo in CD / DVD Drive and Display adapters

Discription should be Description

The OEM Serial displayed in your information is not the installation serialnumber for the windows installation

$HKLM = "HKEY_LOCAL_MACHINE"
If @ProcessorArch = "X64" Then  $HKLM = "HKEY_LOCAL_MACHINE64"

$DPID = RegRead($HKLM & "\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "DigitalProductID")

Func DecodeProductKey($BinaryDPID)
    Local $bKey[15]
    Local $sKey[29]
    Local $Digits[24]
    Local $Value = 0
    Local $hi = 0
    Local $n = 0
    Local $i = 0
    Local $dlen = 29
    Local $slen = 15
    Local $Result
    $Digits = StringSplit("BCDFGHJKMPQRTVWXY2346789", "")
    $BinaryDPID = StringMid($BinaryDPID, 105, 30)
    For $i = 1 To 29 Step 2
        $bKey[Int($i / 2)] = Dec(StringMid($BinaryDPID, $i, 2))
    Next

    For $i = $dlen - 1 To 0 Step -1
        If Mod(($i + 1), 6) = 0 Then
            $sKey[$i] = "-"
        Else
            $hi = 0
            For $n = $slen - 1 To 0 Step -1
                $Value = BitOR(BitShift($hi, -8), $bKey[$n])
                $bKey[$n] = Int($Value / 24)
                $hi = Mod($Value, 24)
            Next
            $sKey[$i] = $Digits[$hi + 1]
        EndIf
    Next
    For $i = 0 To 28
        $Result = $Result & $sKey[$i]
    Next
    Return $Result
EndFunc   ;==>DecodeProductKey

$Serial = DecodeProductKey($DPID)

This is not my code.. someone else made it..

Edited by Emiel Wieldraaijer

Best regards,Emiel Wieldraaijer

Posted (edited)

@HeidiR

Another typo in CD / DVD Drive and Display adapters

Discription should be Description

The OEM Serial displayed in your information is not the installation serialnumber for the windows installation

$HKLM = "HKEY_LOCAL_MACHINE"
If @ProcessorArch = "X64" Then  $HKLM = "HKEY_LOCAL_MACHINE64"

$DPID = RegRead($HKLM & "\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "DigitalProductID")

Func DecodeProductKey($BinaryDPID)
    Local $bKey[15]
    Local $sKey[29]
    Local $Digits[24]
    Local $Value = 0
    Local $hi = 0
    Local $n = 0
    Local $i = 0
    Local $dlen = 29
    Local $slen = 15
    Local $Result
    $Digits = StringSplit("BCDFGHJKMPQRTVWXY2346789", "")
    $BinaryDPID = StringMid($BinaryDPID, 105, 30)
    For $i = 1 To 29 Step 2
        $bKey[Int($i / 2)] = Dec(StringMid($BinaryDPID, $i, 2))
    Next

    For $i = $dlen - 1 To 0 Step -1
        If Mod(($i + 1), 6) = 0 Then
            $sKey[$i] = "-"
        Else
            $hi = 0
            For $n = $slen - 1 To 0 Step -1
                $Value = BitOR(BitShift($hi, -8), $bKey[$n])
                $bKey[$n] = Int($Value / 24)
                $hi = Mod($Value, 24)
            Next
            $sKey[$i] = $Digits[$hi + 1]
        EndIf
    Next
    For $i = 0 To 28
        $Result = $Result & $sKey[$i]
    Next
    Return $Result
EndFunc   ;==>DecodeProductKey

$Serial = DecodeProductKey($DPID)

This is not my code.. someone else made it..

Hi Emiel,

Thanks for the additional typos and the PID code. Question on the PID. Currently, my utility returns the numeric Windows Product Id using a wmi call, which (for me) matches "ProductId" in [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion].

I believe the code above attempts to provide the alphanumeric Windows Product Key found on the Windows hologram decal.

I ran the code above but unfortunately it did not return the correct alphanumeric Windows Product Key found on my Windows hologram decal on my test machines.

This would be useful information if I could find the code!

HeidiR

Edited by HeidiR
HeidiRFind free applications, code examples and more on my site at:http://heidisdownloads.com/
Posted

@HeidiR

Indeed it recovers the hologram serial number which is used for installation..

The Nirsoft ProductKey recovers the exact same serial as my provided script

http://www.nirsoft.net/utils/product_cd_key_viewer.html

The recovered serial could be different from the one on the hologram sticker.. it's common for computers with recovery disk .. which install without asking for a serial..

Best regards,Emiel Wieldraaijer

Posted

@HeidiR

Indeed it recovers the hologram serial number which is used for installation..

The Nirsoft ProductKey recovers the exact same serial as my provided script

http://www.nirsoft.net/utils/product_cd_key_viewer.html

The recovered serial could be different from the one on the hologram sticker.. it's common for computers with recovery disk .. which install without asking for a serial..

HI Emiel,

Thanks for the additional information and link. Verry informative! I have included the Windows Product Key as you suggested. As usual, the latest build can be found at the following link:

http://autoit.netfirms.com/public/

Enjoy!

HeidiRFind free applications, code examples and more on my site at:http://heidisdownloads.com/
  • 1 month later...
Posted

Th Number of cores can fetched this way:

$PATH = "HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor"
For $i = 1 To 40
    RegEnumKey($PATH,$i)
    If @error Then ExitLoop
Next
$i -= 1
MsgBox(0, 'Number of CPU', $i)

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Posted

Th Number of cores can fetched this way:

$PATH = "HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor"
For $i = 1 To 40
    RegEnumKey($PATH,$i)
    If @error Then ExitLoop
Next
$i -= 1
MsgBox(0, 'Number of CPU', $i)
$Cores = ENVGET("NUMBER_OF_PROCESSORS")

is easier.. and will retrieve the number of cores ..

Your msgbox is not correct because your method will retrieve cores and not CPU numbers

My Dual Quad Core is detected as 8 cores but still 2 cpu's

Best regards,Emiel Wieldraaijer

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...