Jump to content

Recommended Posts

Posted

Hello. How can I get the processor serial number in AutoIT? Or something that is unique to any processor?

I am trying to make a script that only runs on a certain PC.

Posted

Look here:

Func GetProcessorId()
$objWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Processor", "WQL",0x10+0x20)
If IsObj($colItems) Then
    For $objItem In $colItems
    Local $PROC_ID = $objItem.ProcessorId
    Next
    Return $PROC_ID
Else
    Return 0
EndIf
EndFunc

MsgBox(0,"",GetProcessorId())

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