获得硬盘序列号 Dim cmicWmi As New SystemManagementManagementObjectSearcher(SELECT * FROM Win_DiskDrive) Dim Uint As UInt For Each cmicWmiObj As ManagementObject In cmicWmiGet Uint = cmicWmiObj(signature) Next TextBoxText = UintToString 获得CPU序列号 Dim Wmi As New SystemManagementManagementObjectSearcher(SELECT * FROM Win_Processor) Dim Uint As String For Each WmiObj As ManagementObject In WmiGet Uint = WmiObj(ProcessorId) Next TextBoxText = Uint 获得硬盘总容量 Dim Wmi As New SystemManagementManagementObjectSearcher(SELECT * FROM Win_DiskDrive) Dim Uint As UInt For Each WmiObj As ManagementObject In WmiGet Uint = WmiObj(size) Next TextBoxText = UintToString 首先引用SystemManagement然后在代码中Imports SystemManagement |