Jump to content

How to define serial number of the processor (Inte


zxc3
 Share

Recommended Posts

How to define serial number of the processor (Intel/AMD)?

I want, that the program worked only by the concrete machine with this processor.

<{POST_SNAPBACK}>

You could look into PSTools by Sysinternals.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

You could look into PSTools by Sysinternals.

<{POST_SNAPBACK}>

PCTOOLs and others not work in my case -

c:> psinfo \\development -h -d

PsInfo v1.6 - local and remote system information viewer

Copyright © 2001-2004 Mark Russinovich

Sysinternals - www.sysinternals.com

System information for \\DEVELOPMENT:

Uptime: 28 days, 0 hours, 15 minutes, 12 seconds

Kernel version: Microsoft Windows XP, Multiprocessor Free

Product type Professional

Product version: 5.1

Service pack: 0

Kernel build number: 2600

Registered organization: Sysinternals

Registered owner: Mark Russinovich

Install date: 1/2/2002, 5:29:21 PM

Activation status: Activated

IE version: 6.0000

System root: C:\WINDOWS

Processors: 2

Processor speed: 1.0 GHz

Processor type: Intel Pentium III

Physical memory: 1024 MB

Volume Type Format Label Size Free Free

A: Removable 0%

C: Fixed NTFS WINXP 7.8 GB 1.3 GB 16%

D: Fixed NTFS DEV 10.7 GB 809.7 MB 7%

E: Fixed NTFS SRC 4.5 GB 1.8 GB 41%

F: Fixed NTFS MSDN 2.4 GB 587.5 MB 24%

G: Fixed NTFS GAMES 8.0 GB 1.0 GB 13%

H: CD-ROM CDFS JEDIOUTCAST 633.6 MB 0%

I: CD-ROM 0%

Q: Remote 0%

T: Fixed NTFS Test 502.0 MB 496.7 MB 99%

OS Hot Fix Installed

Q147222 1/2/2002

Q309521 1/4/2002

Q311889 1/4/2002

Q313484 1/4/2002

Q314147 3/6/2002

Q314862 3/13/2002

Q315000 1/8/2002

Q315403 3/13/2002

Q317277 3/20/2002

Where is serial number of CPU(processor)?

Link to comment
Share on other sites

How to define serial number of the processor (Intel/AMD)?

I want, that the program worked only by the concrete machine with this processor.

<{POST_SNAPBACK}>

; Generated by AutoIt Scriptomatic

$wbemFlagReturnImmediately = 0x10

$wbemFlagForwardOnly = 0x20

$colItems = ""

$strComputer = "localhost"

$Output=""

$Output = $Output & "Computer: " & $strComputer & @CRLF

$Output = $Output & "==========================================" & @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 = $Output & "AddressWidth: " & $objItem.AddressWidth & @CRLF

$Output = $Output & "Architecture: " & $objItem.Architecture & @CRLF

$Output = $Output & "Availability: " & $objItem.Availability & @CRLF

$Output = $Output & "Caption: " & $objItem.Caption & @CRLF

$Output = $Output & "ConfigManagerErrorCode: " & $objItem.ConfigManagerErrorCode & @CRLF

$Output = $Output & "ConfigManagerUserConfig: " & $objItem.ConfigManagerUserConfig & @CRLF

$Output = $Output & "CpuStatus: " & $objItem.CpuStatus & @CRLF

$Output = $Output & "CreationClassName: " & $objItem.CreationClassName & @CRLF

$Output = $Output & "CurrentClockSpeed: " & $objItem.CurrentClockSpeed & @CRLF

$Output = $Output & "CurrentVoltage: " & $objItem.CurrentVoltage & @CRLF

$Output = $Output & "DataWidth: " & $objItem.DataWidth & @CRLF

$Output = $Output & "Description: " & $objItem.Description & @CRLF

$Output = $Output & "DeviceID: " & $objItem.DeviceID & @CRLF

$Output = $Output & "ErrorCleared: " & $objItem.ErrorCleared & @CRLF

$Output = $Output & "ErrorDescription: " & $objItem.ErrorDescription & @CRLF

$Output = $Output & "ExtClock: " & $objItem.ExtClock & @CRLF

$Output = $Output & "Family: " & $objItem.Family & @CRLF

$Output = $Output & "InstallDate: " & WMIDateStringToDate($objItem.InstallDate) & @CRLF

$Output = $Output & "L2CacheSize: " & $objItem.L2CacheSize & @CRLF

$Output = $Output & "L2CacheSpeed: " & $objItem.L2CacheSpeed & @CRLF

$Output = $Output & "LastErrorCode: " & $objItem.LastErrorCode & @CRLF

$Output = $Output & "Level: " & $objItem.Level & @CRLF

$Output = $Output & "LoadPercentage: " & $objItem.LoadPercentage & @CRLF

$Output = $Output & "Manufacturer: " & $objItem.Manufacturer & @CRLF

$Output = $Output & "MaxClockSpeed: " & $objItem.MaxClockSpeed & @CRLF

$Output = $Output & "Name: " & $objItem.Name & @CRLF

$Output = $Output & "OtherFamilyDescription: " & $objItem.OtherFamilyDescription & @CRLF

$Output = $Output & "PNPDeviceID: " & $objItem.PNPDeviceID & @CRLF

$strPowerManagementCapabilities = $objItem.PowerManagementCapabilities(0)

$Output = $Output & "PowerManagementCapabilities: " & $strPowerManagementCapabilities & @CRLF

$Output = $Output & "PowerManagementSupported: " & $objItem.PowerManagementSupported & @CRLF

$Output = $Output & "ProcessorId: " & $objItem.ProcessorId & @CRLF

$Output = $Output & "ProcessorType: " & $objItem.ProcessorType & @CRLF

$Output = $Output & "Revision: " & $objItem.Revision & @CRLF

$Output = $Output & "Role: " & $objItem.Role & @CRLF

$Output = $Output & "SocketDesignation: " & $objItem.SocketDesignation & @CRLF

$Output = $Output & "Status: " & $objItem.Status & @CRLF

$Output = $Output & "StatusInfo: " & $objItem.StatusInfo & @CRLF

$Output = $Output & "Stepping: " & $objItem.Stepping & @CRLF

$Output = $Output & "SystemCreationClassName: " & $objItem.SystemCreationClassName & @CRLF

$Output = $Output & "SystemName: " & $objItem.SystemName & @CRLF

$Output = $Output & "UniqueId: " & $objItem.UniqueId & @CRLF

$Output = $Output & "UpgradeMethod: " & $objItem.UpgradeMethod & @CRLF

$Output = $Output & "Version: " & $objItem.Version & @CRLF

$Output = $Output & "VoltageCaps: " & $objItem.VoltageCaps & @CRLF

if Msgbox(1,"WMI Output",$Output) = 2 then ExitLoop

$Output=""

Next

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

Maybe a combination of these would do the trick.

Link to comment
Share on other sites

  • 1 year later...

Hey nice reply Confuzzled,

Just wondering if anyone had any good websites, books or any help really regarding the use of ObjGet

objWMIService.ExecQuery etc. Where to start learning that stuff would be helpful to know.

Thanks

It's COM programming. I only started doing that last night, but OLEVIEW.exe is good to look at your own machine and their's an AutoIt primer at

http://www.autoitscript.com/autoit3/docs/intro/ComRef.htm

Found a page that discusses objWMIService.ExecQuery usage..

http://www.microsoft.com/technet/scriptcen...e.mspx?mfr=true

Aha.. I have unlocked it's secrets.. world domination is within my grasp...

Link to comment
Share on other sites

  • 4 weeks later...

I know this is a bit old, but I never saw where he got what he wanted. Use the link in my signature to goto my CompInfo.au3 Library of functions. The _ComputerGetProcessors() should help you with the information you need.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

  • 3 weeks later...

; Generated by AutoIt Scriptomatic

$wbemFlagReturnImmediately = 0x10

$wbemFlagForwardOnly = 0x20

$colItems = ""

$strComputer = "localhost"

$Output=""

$Output = $Output & "Computer: " & $strComputer & @CRLF

$Output = $Output & "==========================================" & @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 = $Output & "AddressWidth: " & $objItem.AddressWidth & @CRLF

$Output = $Output & "Architecture: " & $objItem.Architecture & @CRLF

$Output = $Output & "Availability: " & $objItem.Availability & @CRLF

$Output = $Output & "Caption: " & $objItem.Caption & @CRLF

$Output = $Output & "ConfigManagerErrorCode: " & $objItem.ConfigManagerErrorCode & @CRLF

$Output = $Output & "ConfigManagerUserConfig: " & $objItem.ConfigManagerUserConfig & @CRLF

$Output = $Output & "CpuStatus: " & $objItem.CpuStatus & @CRLF

$Output = $Output & "CreationClassName: " & $objItem.CreationClassName & @CRLF

......

......

Nice... Do you know where to find these "variables" ? like Win32_Processor and objItem.Availability ?

If you can find them in Oleview.. then where ;)

:whistle:

Link to comment
Share on other sites

Nice... Do you know where to find these "variables" ? like Win32_Processor and objItem.Availability ?

If you can find them in Oleview.. then where ;)

:whistle:

I do believe OLEView can see them, but I have done a lot of referencing with MSDN. I have used the Scriptomatic4AutoIt to help me create the CompInfo library in my signature.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

I do believe OLEView can see them, but I have done a lot of referencing with MSDN. I have used the Scriptomatic4AutoIt to help me create the CompInfo library in my signature.

JS

Nice. Do you know how I can get "Model Name" like the one in SystemInformation? (Start:Access:System:)

Mats :whistle:

Link to comment
Share on other sites

Nice. Do you know how I can get "Model Name" like the one in SystemInformation? (Start:Access:System:)

Mats :whistle:

The "Model Name" for what? The processor?

If that is the case use my CompInfo Library as follows.

#include "CompInfo.au3"

Global $arrayProcessorInfo

_ComputerGetProcessors($arrayProcessorInfo)

MsgBox(4096, "Model Name", $arrayProcessorInfo[1][0])

Run that (obviously) in the same directory where you downloaded my CompInfo library, and you will have what I believe you are looking for.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

No.. check out the screenshot

Posted Image

This "System Model" :whistle:

Okay I am a bit more understanding of your needs. It appears you are in Vista? (I don't recognize that interface in XP SP2).

Check out one or both of the following functions (also in my library).

_ComputerGetSystem()
;and
_ComputerGetSystemProduct()

I believe both will have the information you are looking for. In System its under Model Name, in SystemProduct it's under Name.

I hope this helps,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Okay I am a bit more understanding of your needs. It appears you are in Vista? (I don't recognize that interface in XP SP2).

Check out one or both of the following functions (also in my library).

_ComputerGetSystem()
;and
_ComputerGetSystemProduct()

I believe both will have the information you are looking for. In System its under Model Name, in SystemProduct it's under Name.

I hope this helps,

JS

Great :P Win32_ComputerSystem / Model was the one I was looking for.

(btw. It's WinXP with hacked ThemeXPUI ;) )

:whistle:

Link to comment
Share on other sites

Great :P Win32_ComputerSystem / Model was the one I was looking for.

(btw. It's WinXP with hacked ThemeXPUI ;) )

:whistle:

Glad I was able to help.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
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
 Share

  • Recently Browsing   0 members

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