怎样获取笔记本序列号
才学几天,很多地方不了解最近需要做一个获取笔记本(品牌机)ID的脚本
今天白天查资料实在没找到 所以想上来请教一下
给个思路也行,我从网上找了个函数 ,可惜看不懂 也不懂怎么调用
贴上来给大家过目下,希望有用
;===============================================================================
; Description: Returns the System Product information in an array.
; Parameter(s): $aSysProductInfo - By Reference - System Product Information array.
; Requirement(s): None
; Return Value(s):On Success - Returns array of System Product Information.
; ;===============================================================================
; Description: Returns the System Product information in an array.
; Parameter(s): $aSysProductInfo - By Reference - System Product Information array.
; Requirement(s): None
; Return Value(s):On Success - Returns array of System Product Information.
; $aKeyboardInfo = Number of Keyboards
; $aKeyboardInfo[$i]= Name ($i starts at 1)
; $aKeyboardInfo[$i]= Identifying Number
; $aKeyboardInfo[$i]= SKU Number
; $aKeyboardInfo[$i]= UUID
; $aKeyboardInfo[$i]= Description
; $aKeyboardInfo[$i]= Vendor
; $aKeyboardInfo[$i]= Version
; On Failure - @error = 1 and Returns 0
; @extended = 1 - Array contains no information
; 2 - $colItems isnt an object
; Author(s): Jarvis Stubblefield (support "at" vortexrevolutions "dot" com)
; Note(s):
;===============================================================================
Func _ComputerGetSystemProduct(ByRef $aSysProductInfo)
Local $colItems, $objWMIService, $objItem
Dim $aSysProductInfo, $i = 1
$objWMIService = ObjGet("winmgmts:\\" & $cI_Compname & "\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystemProduct", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
If IsObj($colItems) Then
For $objItem In $colItems
ReDim $aSysProductInfo
$aSysProductInfo[$i]= $objItem.Name
$aSysProductInfo[$i]= $objItem.IdentifyingNumber
$aSysProductInfo[$i]= $objItem.SKUNumber
$aSysProductInfo[$i]= $objItem.UUID
$aSysProductInfo[$i]= $objItem.Description
$aSysProductInfo[$i]= $objItem.Vendor
$aSysProductInfo[$i]= $objItem.Version
$i += 1
Next
$aSysProductInfo = UBound($aSysProductInfo) - 1
If $aSysProductInfo < 1 Then
SetError(1, 1, 0)
EndIf
Else
SetError(1, 2, 0)
EndIf
EndFunc ;_ComputerGetSystemProduct 能告诉这个函数的出处吗、 不知道你所所指的 “获取笔记本(品牌机)ID的脚本 “ 是主板型号,还是笔记本背后贴的条码。对电脑不是很懂,请问笔记本的ID具体是什么。 本帖最后由 ila 于 2015-7-15 20:51 编辑
如果是原装系统,获取的数据部分有用。
其实厂家维修检测是硬件码 回复 3# h20040606
函数是从国外网站找来的 ,整个UDF,我看看能上传不 回复 4# Huiseyu
多谢回复 ,已经解决了 调用wmic命令获取 学习了,不错,,
页:
[1]