Script-VBS-利用GetObject(WinMgmts)获取系统信息
来源:互联网 发布:英雄联盟mac版有国服吗 编辑:程序博客网 时间:2024/06/16 12:13
用WMI对象列出系统所有进程:
----Instance.vbs----
程序代码
Dim WMI,objs
Set WMI = GetObject("WinMgmts:")
Set objs = WMI.InstancesOf("Win32_Process")
For Each obj In objs
Enum1 = Enum1 + obj.Description + Chr(13) + Chr(10)
Next
msgbox Enum1
获得物理内存的容量:
-----physicalMemory.vbs-----
程序代码strComputer = "."
Set wbemServices = GetObject("winmgmts:\\" & strComputer)
Set wbemObjectSet = wbemServices.InstancesOf("Win32_LogicalMemoryConfiguration")
For Each wbemObject In wbemObjectSet
WScript.Echo "物理内存 (MB): " & CInt(wbemObject.TotalPhysicalMemory/1024)
Next
取得系统所有服务及运行状态
----service.vbs----
程序代码Set ServiceSet = GetObject("winmgmts:").InstancesOf("Win32_Service")
Dim s,infor
infor=""
for each s in ServiceSet
infor=infor+s.Description+" ==> "+s.State+chr(13)+chr(10)
next
msgbox infor
CPU的序列号:
---CPUID.vbs---
程序代码Dim cpuInfo
cpuInfo = ""
set moc = GetObject("Winmgmts:").InstancesOf("Win32_Processor")
for each mo in moc
cpuInfo = CStr(mo.ProcessorId)
msgbox "CPU SerialNumber is : " & cpuInfo
next
硬盘型号:
---HDID.vbs---
程序代码Dim HDid,moc
set moc =GetObject("Winmgmts:").InstancesOf("Win32_DiskDrive")
for each mo in moc
HDid = mo.Model
msgbox "硬盘型号为:" & HDid
next
网卡MAC物理地址:
---MACAddress.vbs---
程序代码Dim mc
set mc=GetObject("Winmgmts:").InstancesOf("Win32_NetworkAdapterConfiguration")
for each mo in mc
if mo.IPEnabled=true then
msgbox "网卡MAC地址是: " & mo.MacAddress
exit for
end if
next
测试你的显卡:
程序代码
On Error Resume Next
Dim ye
Dim yexj00
set yexj00=GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf("Win32_VideoController")
for each ye in yexj00
msgbox "型 号: " & ye.VideoProcessor & vbCrLf & "厂 商: " & ye.AdapterCompatibility & vbCrLf & "名 称: " & ye.Name & vbCrLf & "状 态: " & ye.Status & vbCrLf & "显 存: " & (ye.AdapterRAM\1024000) & "MB" & vbCrLf & "驱 动(dll): " & ye.InstalledDisplayDrivers & vbCrLf & "驱 动(inf): " & ye.infFilename & vbCrLf & "版 本: " & ye.DriverVersion
next
- Script-VBS-利用GetObject(WinMgmts)获取系统信息
- 利用GetObject("WinMgmts:")获取系统信息
- 利用GetObject("WinMgmts:")获取系统信息
- 利用GetObject("WinMgmts:")获取系统信息
- 利用GetObject("WinMgmts:")获取系统信息
- 利用GetObject("WinMgmts:")获取系统信息
- 利用GetObject("WinMgmts:")获取系统信息
- 通过VBS 获取系统所有服务信息
- VBS-JSCRIPT GETOBJECT理解
- VBS-JSCRIPT GETOBJECT理解
- 远程或本地获取系统信息的脚本RGIS.vbs
- VBS获取服务的信息
- 利用API函数获取系统信息
- vbs通过GetObject使用Windows管理工具
- script 获取客户端页面信息
- VBS 获取指定电脑的部分信息...
- VBS 获取当前所在时区信息
- 用vbs脚本获取磁盘信息
- UNION 联合查询时 子查询中包含order by的处理
- Linux串口编程-2-mark校验
- 使用 /sys 文件系统访问 Linux 内核
- vbs创建注册表项
- 采用python中SQLalchemy模块访问数据库(三)
- Script-VBS-利用GetObject(WinMgmts)获取系统信息
- 入手树莓派(raspberry pi)了
- Linux链接文件的三种类型
- wzplayer for android V1.0
- 在Java中直接调用js代码
- 利用GetObject("WinMgmts:")获取系统信息
- BB10 Cascades Beta3: 如何查看qDebug()和console.log()信息
- vmware 与主机共享文件夹
- 操作系统开发 – 开发multiboot内核要小心的一个东西