通过WMI获得硬件信息
来源:互联网 发布:北京国税开票软件 编辑:程序博客网 时间:2024/05/01 00:58
'Dim MYIP As System.Net.IPHostEntry = System.Net.Dns.GetHostByName(System.Net.Dns.GetHostName)
'MsgBox("您的IP地址:" & MYIP.AddressList.GetValue(0).ToString)
'MsgBox("您的计算机全名:" & MYIP.HostName.ToString)
'MsgBox("您的系统:" & Environment.OSVersion.ToString)
'得到显示器分辨率()
'Dim X As Short = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width
'Dim Y As Short = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height
'MsgBox(X & "*" & Y)
'桌面的路径
'MsgBox(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory))
'"Favorites"收藏夹路径
'MsgBox(Environment.GetFolderPath(Environment.SpecialFolder.Favorites))
'"Application Data"路径
'MsgBox(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData))
'取cpu id
Dim ProcQuery As New SelectQuery("Win32_Processor")
Dim ProcSearch As New ManagementObjectSearcher(ProcQuery)
Dim ProcInfo As ManagementObject
For Each ProcInfo In ProcSearch.Get()
'MsgBox("ProcessorId: " & ProcInfo("ProcessorId".ToString()))
Next
'取主板ID 无效
'Dim searcher As ManagementObjectSearcher = New ManagementObjectSearcher("Select SerialNumber From Win32_BIOS")
'Dim share As ManagementObject
'For Each share In searcher.Get()
' MsgBox("序列号:" & share("SerialNumber"))
'Next share
'轮循网卡MAC地址
'Dim Wmi As New System.Management.ManagementObjectSearcher("SELECT * FROM Win32_NetworkAdapterConfiguration")
'Dim macadd As String
'For Each WmiObj As ManagementObject In Wmi.Get
'If CBool(WmiObj("IPEnabled")) Then
'MsgBox("IP(" & WmiObj("IPAddress")(0) & ")|MAC(" & WmiObj("MACAddress") & ")")
'macadd = macadd & Replace(WmiObj("MACAddress"), ":", "")
'End If
'Next
'MsgBox(macadd)
'获得硬盘序列号
'Dim cmicWmi As New System.Management.ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive")
'Dim Uint32 As UInt32
'For Each cmicWmiObj As ManagementObject In cmicWmi.Get
'UInt32 = cmicWmiObj("signature")
'Next
'MsgBox(UInt32.ToString)
'获得硬盘总容量
'Dim Wmi As New System.Management.ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive")
'Dim Uint64 As UInt64
'For Each WmiObj As ManagementObject In Wmi.Get
'UInt64 = WmiObj("size")
'Next
'MsgBox(UInt64.ToString)
首先,引用System.Management;然后在代码中Imports System.Management;
- 通过WMI获得硬件信息
- 通过WMI获得网卡MAC地址,硬盘序号,主板序号等硬件信息
- window下c语言通过WMI获得网卡MAC地址,硬盘序号,主板序号等硬件信息
- WMI获取硬件信息
- WMI获取硬件信息
- WMI获取硬件信息
- 通过 WMI来获取本地计算机软件硬件信息
- C#中通过wmi获取硬件的信息
- 通过WMI获得硬盘序列号或其他信息
- 用WMI获取硬件信息
- C/C++通过WMI和系统API函数获取获取系统硬件配置信息
- C/C++通过WMI和系统API函数获取获取系统硬件配置信息
- C/C++通过WMI和系统API函数获取获取系统硬件配置信息 .
- C/C++通过WMI和系统API函数获取获取系统硬件配置信息
- C/C++通过WMI和系统API函数获取获取系统硬件配置信息
- C/C++通过WMI和系统API函数获取系统硬件配置信息
- C++通过WMI和系统API函数获取获取系统硬件配置信息
- 学习获得硬件信息
- VB.NET轻松实现任务栏程序
- Difference between RVCT and GCCE
- 索引视图的建立
- 在ASP.NET中读写Excel文件
- C#获取QQ在线状态代码
- 通过WMI获得硬件信息
- 页面执行时间
- 使用 NetBeans IDE 5.5 创建漂亮的 GUI
- 将人民币的数字表示转化成大写表示
- ASP.net 验证码(C#)
- 自定义的工具栏中使用engine提供的内建命令
- 一个功能齐全的DataGrid分页例子
- Asp.NET常用函数
- 您可能不知道的.Net2.0小技巧