VB获取系统信息:
Dim System, item, i As Integer
Set System = GetObject("winmgmts:").InstancesOf("Win32_ComputerSystem")
For Each item In System
MsgBox ("计算机名称: " & item.Name)
MsgBox ("状态: " & item.Status)
MsgBox ("类型: " & item.SystemType)
MsgBox ("生产厂家: " & item.Manufacturer)
MsgBox ("型号: " & item.Model)
MsgBox ("内存: " & item.totalPhysicalMemory 1024 1024 & "MB")
MsgBox ("域: " & item.domain)
MsgBox ("工作组" & item.Workgroup)
MsgBox ("当前用户: " & item.username)
MsgBox ("启动状态: " & item.BootupState)
MsgBox ("该计算机属于: " & item.PrimaryOwnerName)
MsgBox ("系统类型: " & item.CreationClassName)
MsgBox ("计算机类型: " & item.Description)
For i = 0 To 1 '这里假设安装了两个系统
MsgBox ("启动选项" & i & ": " & item.SystemStartupOptions(i))
Next i
Next文章来源于lcx.cc:【VB技巧】VB获取系统信息、硬件信息
那天某网站的编辑给我送点东西过来,一个女孩大老远跑过来又正好赶上饭点,我就顺便请她吃顿晚饭。挺朴素一个女孩,说说笑笑半个小时就吃差不多了。结账的时候,她挺认真地看着我问:“哥,剩下的菜我能打包么?” 我一愣,问:“打包剩菜干啥啊?你喜欢吃啥,我再给你买点呗。”…
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论