| View previous topic :: View next topic |
| Author |
Message |
Maja Guest
|
Posted: Mon Nov 19, 2007 8:03 am Post subject: Motherboard SN |
|
|
is there anyway to get the Serial No of Motherboard with AHK.
Thanks. |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1397
|
Posted: Mon Nov 19, 2007 12:04 pm Post subject: |
|
|
| WMI with Win32_BaseBoard. |
|
| Back to top |
|
 |
Guest
|
Posted: Mon Nov 19, 2007 12:05 pm Post subject: Re: Motherboard SN |
|
|
 |
|
| Back to top |
|
 |
AHKpandit Guest
|
Posted: Tue Nov 20, 2007 6:41 am Post subject: |
|
|
| Sean wrote: | | WMI with Win32_BaseBoard. |
Can you give me an example?
I am new I cannot understand you.
Thanks. |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1397
|
Posted: Tue Nov 20, 2007 6:59 am Post subject: |
|
|
Read this page before using it:
http://www.autohotkey.com/forum/topic25362.html&highlight=wmi
| Code: | COM_Init()
psvc := COM_GetObject("winmgmts:{impersonationLevel=impersonate}!" . "\\.\root\cimv2")
pset := COM_Invoke(psvc, "ExecQuery", "SELECT * FROM " . "Win32_BaseBoard")
penm := COM_Invoke(pset, "_NewEnum")
If COM_Enumerate(penm, pobj) = 0
SerialNumber := COM_Invoke(pitm:=COM_Invoke(pprs:=COM_Invoke(pobj, "Properties_"), "Item", "SerialNumber"), "Value"), COM_Release(pitm), COM_Release(pprs), COM_Release(pobj)
COM_Release(penm)
COM_Release(pset)
COM_Release(psvc)
COM_Term()
MsgBox, % SerialNumber
|
|
|
| Back to top |
|
 |
AHKpandit Guest
|
Posted: Tue Nov 20, 2007 10:58 am Post subject: |
|
|
Hello Sean thanks for help I try this but I am receiving this message.
I am using latest version of AHK |
|
| Back to top |
|
 |
hotzenpl0tz
Joined: 22 Oct 2007 Posts: 11
|
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1397
|
Posted: Tue Nov 20, 2007 2:54 pm Post subject: |
|
|
| It's the reason why I told "read the linked page first". You can use it via #Include as hotzenpl0tz said or Standard Library. |
|
| Back to top |
|
 |
AHKpandit Guest
|
Posted: Fri Nov 23, 2007 4:05 am Post subject: |
|
|
@Sean
Can you get Processor SN? |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1397
|
|
| Back to top |
|
 |
|