Noname > 23-08-10, 01:25 PM
' Lay thong tin CPU
Function GetCPUID()
'ta.o ?o^'i ty'o+.ng di.ch vu. WMI
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
'ti`m các CPU ?ang cha.y cu?a máy
Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor")
'la(.p hie^?n thi. ID cu?a tu+`ng CPU
For Each objItem In colItems
GetCPUID = objItem.ProcessorId
Next
End Function
Function GetHDDserial()
Dim fso As Object, Drv As Object
'Create a FileSystemObject object
Set fso = CreateObject("Scripting.FileSystemObject")
'Assign the current drive letter if not specified
Set Drv = fso.GetDrive(Environ("SystemDrive"))
With Drv
If .IsReady Then
DriveSerial = Abs(.SerialNumber)
Else '"Drive Not Ready!"
DriveSerial = -1
End If
End With
'Clean up
Set Drv = Nothing
Set fso = Nothing
GetHDDserial = DriveSerial
End Function
Function GetBoardSerial()
Set WMI = GetObject("winmgmts:\\.\root\cimv2")
Set objs = WMI.ExecQuery("Select * from Win32_BaseBoard")
For Each obj In objs
GetBoardSerial = obj.SerialNumber
Next
End Function
DoquangLam > 01-10-10, 11:01 PM
DoquangLam > 01-10-10, 11:17 PM
Noname > 01-10-10, 11:24 PM
DoquangLam > 02-10-10, 12:08 AM
DoquangLam > 02-10-10, 11:25 AM
DoquangLam > 02-10-10, 09:17 PM
Cafe Via He > 04-10-10, 10:32 AM
DoquangLam > 04-10-10, 07:28 PM
DoquangLam > 04-10-10, 07:42 PM