VB.NET如何调用WMI来实现系统管理和系统信息查询
发表于:2025-11-09 作者:千家信息网编辑
千家信息网最后更新 2025年11月09日,这篇文章给大家分享的是有关VB.NET如何调用WMI来实现系统管理和系统信息查询的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。VB.Net调用WMI可以实现系统管理和系统信
千家信息网最后更新 2025年11月09日VB.NET如何调用WMI来实现系统管理和系统信息查询
这篇文章给大家分享的是有关VB.NET如何调用WMI来实现系统管理和系统信息查询的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。
VB.Net调用WMI可以实现系统管理和系统信息查询等。WMI全称为Windows Management Instrumentation,利用WMI我们可以实现很多系统管理的功能,msdn在.Net Framework类库中对此描述比较简单(因为早期WMI相关专题有所较详尽描述,故类库中未再详细解说与演示)。
开发环境: VB2005 Windows2003
本实例需要在菜单栏中的"项目"-" 添加引用" -" System.Management"并在实例代码中导入引用的项目和程序集中定义的命名空间或编程元素 即: Imports System.Management
VB.NET实例教程之VB.NET查询系统启动信息的实例
代码如下:
Private Sub Lobdotcn() Dim Lob_Searcher As New ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_BootConfiguration") For Each Obj_Query As ManagementObject In Lob_Searcher.Get() ListBox1.Items.Add("乐博网LOB.Cn VB.Net爱好者的组织") ListBox1.Items.Add("BootDirectory: " & Obj_Query("BootDirectory")) ListBox1.Items.Add("Caption: " & Obj_Query("Caption")) ListBox1.Items.Add("ConfigurationPath: " & Obj_Query("ConfigurationPath")) ListBox1.Items.Add("Description: " & Obj_Query("Description")) ListBox1.Items.Add("LastDrive: " & Obj_Query("LastDrive")) ListBox1.Items.Add("Name: " & Obj_Query("Name")) ListBox1.Items.Add("ScratchDirectory: " & Obj_Query("ScratchDirectory")) ListBox1.Items.Add("SettingID: " & Obj_Query("SettingID")) ListBox1.Items.Add("TempDirectory: " & Obj_Query("TempDirectory")) Next End Sub
相关属性说明:
BootDirectory Data type: string Access type: Read-only Path to the system files required for booting the system. Example: "C:\Windows" Caption Data type: string Access type: Read-only Qualifiers: MaxLen(64) Short description (one-line string) of the CIM_Setting object. This property is inherited from CIM_Setting. ConfigurationPath Data type: string Access type: Read-only Path to the configuration files. This value may be similar to the value in the BootDirectory property. Description Data type: string Access type: Read-only Description of the CIM_Setting object. This property is inherited from CIM_Setting. LastDrive Data type: string Access type: Read-only Last drive letter to which a physical drive is assigned. Example: "E:" Name Data type: string Access type: Read-only Qualifiers: Key, MaxLen(256) Name of the boot configuration. It is an identifier for the boot configuration. ScratchDirectory Data type: string Access type: Read-only Directory where temporary files can reside during boot time. SettingID Data type: string Access type: Read-only Qualifiers: MaxLen(256) Identifier by which the CIM_Setting object is known. This property is inherited from CIM_Setting. TempDirectory Data type: string Access type: Read-only Directory where temporary files are stored. Example: "C:\TEMP"
感谢各位的阅读!关于"VB.NET如何调用WMI来实现系统管理和系统信息查询"这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!
系统
信息
查询
管理
实例
代码
内容
更多
篇文章
项目
不错
实用
详尽
专题
元素
全称
功能
对此
属性
教程
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
网络安全国赛试题
游戏服务器多久可以重启
天津专业软件开发过程检测中心
动物英语单词软件开发
履行网络安全责任
2k服务器幽浮2
成都交友软件开发哪家实惠
酒店里的开放网络安全吗
foxprov数据库
网络安全竞赛都有什么
常见的软件开发模型不包括
数据库的故障恢复
河北麻将软件开发性价比出众
管家婆能用附加数据库实现还原吗
安卓软件开发工资一般多少钱
八方网络安全科技馆
数据库怎么实现排序
软件开发工作说明书范例
怎么编程语言存数据库
u8erp 数据库初始化
网络安全公司起名大全
瑞恩数据库
长沙个人接软件开发
千万级软件开发付款流程
企业支付的软件开发服务费
软件开发团队的职务有哪些
浙江一站式软件开发设计
58同城应聘的网络安全员
网络技术三级高度总结
幼儿园数据库宣传