1)批处理脚本:Rhea_HardwareInfoCollector.bat
调用VBScript脚本Rhea_HardwareInfoCollector.vbs,并将结果打印到文件Rhea_Result.txt
@if exist Rhea_Result.txt (del Rhea_Result.txt)
@cscript Rhea_HardwareInfoCollector.vbs >> Rhea_Result.txt
@echo "结果已打印到 Rhea_Result.txt"
@pause
2)VBScript脚本:Rhea_HardwareInfoCollector.bat
'On Error Resume Next If WScript.Arguments.Count >= Then
Select Case WScript.Arguments()
Case "-e", "--execute"
Case "-v", "--version"
WScript.Echo "程序版本:1.0.0.0"
WScript.Echo "作者标识:Tsybius2014"
WScript.Echo "作者主页:http://my.oschina.net/Tsybius2014/"
WScript.Echo
WScript.Quit()
Case "-h", "--help"
WScript.Echo "进行检查:Rhea_HardwareInfoCollector.vbs [-e|--execute]"
WScript.Echo "查看帮助:Rhea_HardwareInfoCollector.vbs [-h|--help]"
WScript.Echo "查看版本:Rhea_HardwareInfoCollector.vbs [-v|--version]"
WScript.Echo
WScript.Quit()
End Select
End If Set WMI = GetObject("Winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") Dim i, j, k StartTime = Now SystemOverview
ProcessorInfo
BaseBoardInfo
MemoryInfo
DiskInfo
GraphicsInfo
DisplayInfo
SoundCardInfo
NetworkCardInfo
KeyBoardInfo
BatteryInfo
PointingDeviceInfo
CDROMDriveInfo
OtherHardware FinishTime = Now
RunStats WScript.Echo '打印标题
Sub SetTitle(TitleName) Dim Title : Title = TitleName
For i = To
Title = "-" & Title & "-"
Next
WScript.Echo Title End Sub '系统概览
'参考:https://msdn.microsoft.com/en-us/library/aa394102%28VS.85%29.aspx
Sub SystemOverview SetTitle "1.系统概览" Set Computers = WMI.ExecQuery("Select * from Win32_ComputerSystem")
For Each Computer in Computers Wscript.Echo "生产厂家:" & Computer.Manufacturer
Wscript.Echo "当前用户:" & Computer.UserName Next WScript.Echo End Sub '处理器信息
'参考:https://msdn.microsoft.com/en-us/library/aa394373%28VS.85%29.aspx
Sub ProcessorInfo SetTitle "2.处理器信息" Set CPUs = WMI.InstancesOf("Win32_Processor")
For Each CPU In CPUs WScript.Echo "设备名称: " & CPU.Name
WScript.Echo "设备描述: " & CPU.Description
WScript.Echo "设备说明: " & CPU.Caption
WScript.Echo "处理器标识: " & CPU.ProcessorId Dim ProcessorType : ProcessorType = "处理器类型:"
Select Case CPU.ProcessorType
Case : ProcessorType = ProcessorType & "Other"
Case : ProcessorType = ProcessorType & "Unknown"
Case : ProcessorType = ProcessorType & "Central Processor"
Case : ProcessorType = ProcessorType & "Math Processor"
Case : ProcessorType = ProcessorType & "DSP Processor"
Case : ProcessorType = ProcessorType & "Video Processor"
Case Else : ProcessorType = ProcessorType & "[Type]" & CPU.ProcessorType
End Select
WScript.Echo ProcessorType WScript.Echo "处理器版本: " & CPU.Version
'WScript.Echo "唯一标识: " & CPU.UniqueId
WScript.Echo "设备标识: " & CPU.DeviceID Dim Family : Family = "处理器家族:"
Select Case CPU.Family Case : Family = Family & "Other"
Case : Family = Family & "Unknown"
Case : Family = Family & ""
Case : Family = Family & ""
Case : Family = Family & "Intel386(TM) Processor"
Case : Family = Family & "Intel486(TM) Processor"
Case : Family = Family & ""
Case : Family = Family & ""
Case : Family = Family & "" Case : Family = Family & ""
Case : Family = Family & "Pentium Brand"
Case : Family = Family & "Pentium Pro"
Case : Family = Family & "Pentium II"
Case : Family = Family & "Pentium Processor with MMX(TM) Technology"
Case : Family = Family & "Celeron(TM)"
Case : Family = Family & "Pentium II Xeon(TM)"
Case : Family = Family & "Pentium III"
Case : Family = Family & "M1 Family"
Case : Family = Family & "M2 Family" Case : Family = Family & "AMD Duron(TM) Processor Family"
Case : Family = Family & "K5 Family"
Case : Family = Family & "K6 Family"
Case : Family = Family & "K6-2"
Case : Family = Family & "K6-3"
Case : Family = Family & "AMD Athlon(TM) Processor Family" Case : Family = Family & "AMD2900 Family"
Case : Family = Family & "K6-2+"
Case : Family = Family & "Power PC Family"
Case : Family = Family & "Power PC 601"
Case : Family = Family & "Power PC 603"
Case : Family = Family & "Power PC 603+"
Case : Family = Family & "Power PC 604"
Case : Family = Family & "Power PC 620"
Case : Family = Family & "Power PC X704"
Case : Family = Family & "Power PC 750" Case : Family = Family & "Alpha Family"
Case : Family = Family & "Alpha 21064"
Case : Family = Family & "Alpha 21066"
Case : Family = Family & "Alpha 21164"
Case : Family = Family & "Alpha 21164PC"
Case : Family = Family & "Alpha 21164a"
Case : Family = Family & "Alpha 21264"
Case : Family = Family & "Alpha 21364" Case : Family = Family & "MIPS Family"
Case : Family = Family & "MIPS R4000"
Case : Family = Family & "MIPS R4200"
Case : Family = Family & "MIPS R4400"
Case : Family = Family & "MIPS R4600"
Case : Family = Family & "MIPS R10000" Case : Family = Family & "SPARC Family"
Case : Family = Family & "SuperSPARC"
Case : Family = Family & "microSPARC II"
Case : Family = Family & "microSPARC IIep"
Case : Family = Family & "UltraSPARC"
Case : Family = Family & "UltraSPARC II"
Case : Family = Family & "UltraSPARC IIi"
Case : Family = Family & "UltraSPARC III"
Case : Family = Family & "UltraSPARC IIIi" Case : Family = Family & ""
Case : Family = Family & "68xxx Family"
Case : Family = Family & ""
Case : Family = Family & "" Case : Family = Family & ""
Case : Family = Family & ""
Case : Family = Family & "Hobbit Family"
Case : Family = Family & "Crusoe(TM) TM5000 Family"
Case : Family = Family & "Crusoe(TM) TM3000 Family"
Case : Family = Family & "Efficeon(TM) TM8000 Family"
Case : Family = Family & "Weitek" Case : Family = Family & "Itanium(TM) Processor"
Case : Family = Family & "AMD Athlon(TM) 64 Processor Family"
Case : Family = Family & "AMD Opteron(TM) Processor Family"
Case : Family = Family & "PA-RISC Family"
Case : Family = Family & "PA-RISC 8500"
Case : Family = Family & "PA-RISC 8000"
Case : Family = Family & "PA-RISC 7300LC"
Case : Family = Family & "PA-RISC 7200"
Case : Family = Family & "PA-RISC 7100LC"
Case : Family = Family & "PA-RISC 7100"
Case : Family = Family & "V30 Family" Case : Family = Family & "Pentium III Xeon(TM) Processor"
Case : Family = Family & "Pentium III Processor with Intel SpeedStep(TM) Technology"
Case : Family = Family & "Pentium 4"
Case : Family = Family & "Intel Xeon(TM)"
Case : Family = Family & "AS400 Family"
Case : Family = Family & "Intel Xeon(TM) Processor MP"
Case : Family = Family & "AMD Athlon(TM) XP Family"
Case : Family = Family & "AMD Athlon(TM) MP Family"
Case : Family = Family & "Intel Itanium 2"
Case : Family = Family & "Intel Pentium M Processor"
Case : Family = Family & "K7"
Case : Family = Family & "Intel Core(TM) i7-2760QM" Case : Family = Family & "IBM390 Family"
Case : Family = Family & "G4"
Case : Family = Family & "G5"
Case : Family = Family & "G6"
Case : Family = Family & "z/Architecture Base"
Case : Family = Family & "i860"
Case : Family = Family & "i960"
Case : Family = Family & "SH-3"
Case : Family = Family & "SH-4"
Case : Family = Family & "ARM"
Case : Family = Family & "StrongARM" Case : Family = Family & "6x86"
Case : Family = Family & "MediaGX"
Case : Family = Family & "MII"
Case : Family = Family & "WinChip"
Case : Family = Family & "DSP"
Case : Family = Family & "Video Processor"
Case Else : Family = Family & "[Family Type] " & CPU.Family
End Select
WScript.Echo Family Dim Architecture : Architecture = "处理器架构:"
Select Case CPU.Architecture
Case : Architecture = Architecture & "x86"
Case : Architecture = Architecture & "MIPS"
Case : Architecture = Architecture & "Alpha"
Case : Architecture = Architecture & "PowerPC"
Case : Architecture = Architecture & "ARM"
Case : Architecture = Architecture & "Itanium-based systems"
Case : Architecture = Architecture & "x64"
Case Else : Architecture = Architecture & "[Architecture] " & CPU.Architecture
End Select
WScript.Echo Architecture WScript.Echo "-" WScript.Echo "内核数量: " & CPU.NumberOfCores
WScript.Echo "逻辑处理器数量: " & CPU.NumberOfLogicalProcessors
WScript.Echo "地址长度: " & CPU.AddressWidth
WScript.Echo "数据长度: " & CPU.DataWidth
WScript.Echo "处理速度: " & CPU.CurrentClockSpeed & " MHz"
WScript.Echo "L2缓存: " & CPU.L2CacheSize & " B"
WScript.Echo "L3缓存: " & CPU.L3CacheSize & " B" WScript.Echo "-" Dim CpuStatus : CpuStatus = "处理器状态:"
Select Case CPU.CpuStatus
Case : CpuStatus = CpuStatus & "Unknown"
Case : CpuStatus = CpuStatus & "CPU Enabled"
Case : CpuStatus = CpuStatus & "CPU Disabled by User via BIOS Setup"
Case : CpuStatus = CpuStatus & "CPU Disabled by BIOS (POST Error)"
Case : CpuStatus = CpuStatus & "CPU Is Idle"
Case : CpuStatus = CpuStatus & "Reserved"
Case : CpuStatus = CpuStatus & "Reserved"
Case : CpuStatus = CpuStatus & "Other"
Case Else : CpuStatus = CpuStatus & "[CpuStatus] " & CPU.CpuStatus
End Select
WScript.Echo CpuStatus WScript.Echo "=" Next WScript.Echo End Sub '主板信息
'参考:https://msdn.microsoft.com/en-us/library/aa394072%28VS.85%29.aspx
Sub BaseBoardInfo SetTitle "3.主板信息" Set BaseBoards = WMI.InstancesOf("Win32_BaseBoard")
For Each BaseBoard In BaseBoards WScript.Echo "设备名称: " & BaseBoard.Name
WScript.Echo "设备描述: " & BaseBoard.Description
WScript.Echo "设备说明: " & BaseBoard.Caption
WScript.Echo "主板型号: " & BaseBoard.Product
WScript.Echo "主板版本: " & BaseBoard.Version
WScript.Echo "制造厂商: " & BaseBoard.Manufacturer
WScript.Echo "序列号码: " & BaseBoard.SerialNumber WScript.Echo "-" WScript.Echo "是否底板: " & BaseBoard.HostingBoard
WScript.Echo "可热插拔: " & BaseBoard.HotSwappable
WScript.Echo "是否开启: " & BaseBoard.PoweredOn
WScript.Echo "可拆卸性: " & BaseBoard.Removable
WScript.Echo "可替换性: " & BaseBoard.Replaceable WScript.Echo "-" WScript.Echo "硬件状态: " & BaseBoard.Status WScript.Echo "=" Next WScript.Echo End Sub '内存信息
'参考:https://msdn.microsoft.com/en-us/library/aa394347%28VS.85%29.aspx
Sub MemoryInfo SetTitle "4.内存信息" Set Memorys = WMI.InstancesOf("Win32_PhysicalMemory") For Each Memory In Memorys WScript.Echo "设备名称: " & Memory.Name
WScript.Echo "设备描述: " & Memory.Description
WScript.Echo "设备说明: " & Memory.Caption
WScript.Echo "制造厂商: " & Memory.Manufacturer
WScript.Echo "序列号码: " & Memory.SerialNumber WScript.Echo "-" WScript.Echo "数据宽度: " & Memory.DataWidth Dim FormFactor : FormFactor = "形状系数:"
Select Case Memory.FormFactor
Case : FormFactor = FormFactor & "Unknown"
Case : FormFactor = FormFactor & "Other"
Case : FormFactor = FormFactor & "SIP"
Case : FormFactor = FormFactor & "DIP"
Case : FormFactor = FormFactor & "ZIP"
Case : FormFactor = FormFactor & "SOJ"
Case : FormFactor = FormFactor & "Proprietary"
Case : FormFactor = FormFactor & "SIMM"
Case : FormFactor = FormFactor & "DIMM"
Case : FormFactor = FormFactor & "TSOP"
Case : FormFactor = FormFactor & "PGA"
Case : FormFactor = FormFactor & "RIMM"
Case : FormFactor = FormFactor & "SODIMM"
Case : FormFactor = FormFactor & "SRIMM"
Case : FormFactor = FormFactor & "SMD"
Case : FormFactor = FormFactor & "SSMP"
Case : FormFactor = FormFactor & "SFP"
Case : FormFactor = FormFactor & "TQFP"
Case : FormFactor = FormFactor & "SOIC"
Case : FormFactor = FormFactor & "LCC"
Case : FormFactor = FormFactor & "PLCC"
Case : FormFactor = FormFactor & "BGA"
Case : FormFactor = FormFactor & "FPBGA"
Case : FormFactor = FormFactor & "LGA"
Case Else : FormFactor = FormFactor & "[FormFactor] " & Memory.FormFactor
End Select
WScript.Echo FormFactor WScript.Echo "容量统计: " & Memory.Capacity / / & "MB" Dim MemoryType : MemoryType = "内存类型: "
Select Case Memory.MemoryType
Case : MemoryType = MemoryType & "Unknown"
Case : MemoryType = MemoryType & "Other"
Case : MemoryType = MemoryType & "DRAM"
Case : MemoryType = MemoryType & "Synchronous DRAM"
Case : MemoryType = MemoryType & "Cache DRAM"
Case : MemoryType = MemoryType & "EDO"
Case : MemoryType = MemoryType & "EDRAM"
Case : MemoryType = MemoryType & "VRAM"
Case : MemoryType = MemoryType & "SRAM"
Case : MemoryType = MemoryType & "RAM"
Case : MemoryType = MemoryType & "ROM"
Case : MemoryType = MemoryType & "Flash"
Case : MemoryType = MemoryType & "EEPROM"
Case : MemoryType = MemoryType & "FEPROM"
Case : MemoryType = MemoryType & "EPROM"
Case : MemoryType = MemoryType & "CDRAM"
Case : MemoryType = MemoryType & "3DRAM"
Case : MemoryType = MemoryType & "SDRAM"
Case : MemoryType = MemoryType & "SGRAM"
Case : MemoryType = MemoryType & "RDRAM"
Case : MemoryType = MemoryType & "DDR"
Case : MemoryType = MemoryType & "DDR-2"
Case Else : MemoryType = MemoryType & "[MemoryType] " & Memory.MemoryType
End Select
WScript.Echo MemoryType WScript.Echo "安放位置: " & Memory.DeviceLocator
WScript.Echo "行中位置: " & Memory.PositionInRow WScript.Echo "-" Next WScript.Echo End Sub '硬盘信息
'参考:https://msdn.microsoft.com/en-us/library/aa394132%28VS.85%29.aspx
Sub DiskInfo SetTitle "5.硬盘信息" Set Disks = WMI.ExecQuery("Select * from Win32_DiskDrive WHERE InterfaceType='IDE'")
For Each Disk In Disks WScript.Echo "设备名称:" & Disk.Name
WScript.Echo "设备描述: " & Disk.Description
WScript.Echo "设备说明: " & Disk.Caption
WScript.Echo "硬盘名称:" & Disk.Caption
WScript.Echo "生产厂家:" & Disk.Manufacturer
WScript.Echo "硬盘序列号:" & Disk.SerialNumber
'WScript.Echo "硬盘签名:" & Disk.Signature WScript.Echo "硬盘具有以下能力:"
For Each Capability In Disk.Capabilities
Select Case Capability
Case : WScript.Echo "Unknown"
Case : WScript.Echo "Other"
Case : WScript.Echo "Sequential Access"
Case : WScript.Echo "Random Access"
Case : WScript.Echo "Supports Writing"
Case : WScript.Echo "Encryption"
Case : WScript.Echo "Compression"
Case : WScript.Echo "Supports Removable Media"
Case : WScript.Echo "Manual Cleaning"
Case : WScript.Echo "Automatic Cleaning"
Case : WScript.Echo "SMART Notification"
Case : WScript.Echo "Supports Dual-Sided Media"
Case : WScript.Echo "Ejection Prior to Drive Dismount Not Required"
Case Else : WScript.Echo "-"
End Select
Next WScript.Echo "-" WScript.Echo "硬盘默认分块大小:" & Disk.DefaultBlockSize
WScript.Echo "硬盘最大分块大小:" & Disk.MaxBlockSize
WScript.Echo "硬盘最小分块大小:" & Disk.MinBlockSize
WScript.Echo "硬盘扇区数:" & Disk.SectorsPerTrack WScript.Echo "硬盘柱面数:" & Disk.TotalCylinders
WScript.Echo "硬盘总头数:" & Disk.TotalHeads
WScript.Echo "硬盘扇区数:" & Disk.TotalSectors
WScript.Echo "硬盘总道数:" & Disk.TotalTracks
WScript.Echo "硬盘总道数:" & Disk.TotalTracks
WScript.Echo "每柱磁道数:" & Disk.TracksPerCylinder WScript.Echo "固件版本:" & Disk.FirmwareRevision
WScript.Echo "接口类型:" & Disk.InterfaceType WScript.Echo "-" WScript.Echo "硬盘容量:" & FormatNumber(Disk.Size / / / , ) & " GB" WScript.Echo "=" Next WScript.Echo End Sub '显卡信息
'参考:https://msdn.microsoft.com/en-us/library/aa394512%28VS.85%29.aspx
Sub GraphicsInfo SetTitle "6.显卡信息" Set VIDs = WMI.ExecQuery("SELECT DeviceID FROM Win32_VideoController")
For Each VID In VIDs Set Videos = WMI.ExecQuery("SELECT * FROM Win32_VideoController WHERE DeviceID='"& VID.DeviceID &"'")
For Each Video In Videos WScript.Echo "设备名称: " & Video.Name
WScript.Echo "设备描述: " & Video.Description
WScript.Echo "设备说明: " & Video.Caption
WScript.Echo "制造厂商: " & Video.AdapterCompatibility Dim VideoArchitecture : VideoArchitecture = "视频架构:"
Select Case Video.VideoArchitecture
Case : VideoArchitecture = VideoArchitecture & "Other"
Case : VideoArchitecture = VideoArchitecture & "Unknown"
Case : VideoArchitecture = VideoArchitecture & "CGA"
Case : VideoArchitecture = VideoArchitecture & "EGA"
Case : VideoArchitecture = VideoArchitecture & "VGA"
Case : VideoArchitecture = VideoArchitecture & "SVGA"
Case : VideoArchitecture = VideoArchitecture & "MDA"
Case : VideoArchitecture = VideoArchitecture & "HGC"
Case : VideoArchitecture = VideoArchitecture & "MCGA"
Case : VideoArchitecture = VideoArchitecture & "8514A"
Case : VideoArchitecture = VideoArchitecture & "XGA"
Case : VideoArchitecture = VideoArchitecture & "Linear Frame Buffer"
Case : VideoArchitecture = VideoArchitecture & "PC-98"
Case Else : VideoArchitecture = VideoArchitecture & "[VideoArchitecture] " & Video.VideoArchitecture
End Select
WScript.Echo VideoArchitecture Dim VideoMemoryType : VideoMemoryType = "视频存储器类型:"
Select Case Video.VideoMemoryType
Case : VideoMemoryType = VideoMemoryType & "Other"
Case : VideoMemoryType = VideoMemoryType & "Unknown"
Case : VideoMemoryType = VideoMemoryType & "VRAM"
Case : VideoMemoryType = VideoMemoryType & "DRAM"
Case : VideoMemoryType = VideoMemoryType & "SRAM"
Case : VideoMemoryType = VideoMemoryType & "WRAM"
Case : VideoMemoryType = VideoMemoryType & "EDO RAM"
Case : VideoMemoryType = VideoMemoryType & "Burst Synchronous DRAM"
Case : VideoMemoryType = VideoMemoryType & "Pipelined Burst SRAM"
Case : VideoMemoryType = VideoMemoryType & "CDRAM"
Case : VideoMemoryType = VideoMemoryType & "3DRAM"
Case : VideoMemoryType = VideoMemoryType & "SDRAM"
Case : VideoMemoryType = VideoMemoryType & "SGRAM"
Case Else : VideoMemoryType = VideoMemoryType & "[VideoMemoryType] " & Video.VideoMemoryType
End Select
Wscript.Echo VideoMemoryType WScript.Echo "视频处理器: " & Video.VideoProcessor WScript.Echo "-" WScript.Echo "物理显存: " & Round(Video.AdapterRAM / / )&" MB"
WScript.Echo "分辨率: " & Video.CurrentHorizontalResolution & " * " & Video.CurrentVerticalResolution
WScript.Echo "单位像素比特数:" & Video.CurrentBitsPerPixel & " Bit"
WScript.Echo "刷新频率: " & Video.CurrentRefreshRate & " Hz" WScript.Echo "=" Next
Set Videos = Nothing Next
Set VIDs = Nothing WScript.Echo End Sub '显示器信息
'参考:https://msdn.microsoft.com/en-us/library/aa394122%28VS.85%29.aspx
Sub DisplayInfo SetTitle "7.显示器信息" '显示器信息
Set Monitors = WMI.ExecQuery("Select * from Win32_DesktopMonitor")
For Each Monitor In Monitors WScript.Echo "设备名称: " & Monitor.Name
WScript.Echo "设备描述: " & Monitor.Description
WScript.Echo "设备说明: " & Monitor.Caption
WScript.Echo "显示器类型: " & Monitor.MonitorType
WScript.Echo "生产厂家: " & Monitor.MonitorManufacturer WScript.Echo "-" WScript.Echo "屏幕高度: " & Monitor.ScreenHeight
WScript.Echo "屏幕宽度: " & Monitor.ScreenWidth
WScript.Echo "X轴每逻辑英寸像素数: " & Monitor.PixelsPerXLogicalInch
WScript.Echo "Y轴每逻辑英寸像素数: " & Monitor.PixelsPerYLogicalInch Dim DisplayType : DisplayType = "显示模式:"
Select Case Monitor.DisplayType
Case : DisplayType = DisplayType & "Unknown"
Case : DisplayType = DisplayType & "Other"
Case : DisplayType = DisplayType & "Multiscan Color"
Case : DisplayType = DisplayType & "Multiscan Monochrome"
Case : DisplayType = DisplayType & "Fixed Frequency Color"
Case : DisplayType = DisplayType & "Fixed Frequency Monochrome"
Case Else : DisplayType = DisplayType & "[DisplayType] " & Monitor.DisplayType
End Select
Wscript.Echo DisplayType Dim StatusInfo : StatusInfo = "状态信息:"
Select Case Monitor.StatusInfo
Case : StatusInfo = StatusInfo & "Other"
Case : StatusInfo = StatusInfo & "Unknown"
Case : StatusInfo = StatusInfo & "Enabled"
Case : StatusInfo = StatusInfo & "Disabled"
Case : StatusInfo = StatusInfo & "Not Applicable"
Case Else : StatusInfo = StatusInfo & "[StatusInfo] " & Monitor.StatusInfo
End Select
Wscript.Echo StatusInfo WScript.Echo "=" Next WScript.Echo End Sub '声卡信息
'参考:https://msdn.microsoft.com/en-us/library/aa394463%28VS.85%29.aspx
Sub SoundCardInfo SetTitle "8.声卡信息" '声卡信息
Set SoundDevices = WMI.ExecQuery("SELECT * FROM Win32_SoundDevice")
For Each SoundDevice In SoundDevices WScript.Echo "设备名称: " & SoundDevice.Name
WScript.Echo "设备描述: " & SoundDevice.Description
WScript.Echo "设备说明: " & SoundDevice.Caption
WScript.Echo "制造厂商: " & SoundDevice.Manufacturer Dim StatusInfo : StatusInfo = "状态信息:"
Select Case SoundDevice.StatusInfo
Case : StatusInfo = StatusInfo & "Other"
Case : StatusInfo = StatusInfo & "Unknown"
Case : StatusInfo = StatusInfo & "Enabled"
Case : StatusInfo = StatusInfo & "Disabled"
Case : StatusInfo = StatusInfo & "Not Applicable"
Case Else : StatusInfo = StatusInfo & "[StatusInfo] " & SoundDevice.StatusInfo
End Select
Wscript.Echo StatusInfo WScript.Echo "=" Next
Set SoundDevices = Nothing WScript.Echo End Sub '网卡信息
'参考:https://msdn.microsoft.com/en-us/library/aa394216%28v=vs.85%29.aspx
Sub NetworkCardInfo SetTitle "9.网卡信息" '网卡信息
Set Networks = WMI.ExecQuery("Select * from Win32_NetworkAdapter WHERE PhysicalAdapter ='TRUE'")
For Each Network In Networks WScript.Echo "设备名称: " & Network.Name
WScript.Echo "设备描述: " & Network.Description
WScript.Echo "设备说明: " & Network.Caption
WScript.Echo "适配器型号: " & Network.AdapterType
WScript.Echo "生产厂商: " & Network.Manufacturer
WScript.Echo "设备标识: " & Network.DeviceID WScript.Echo "GUID: "& Network.GUID
WScript.Echo "MAC: "& Network.MACAddress WScript.Echo "-" If Network.NetEnabled = TRUE Then
WScript.Echo "活跃状态:" & "活跃"
Else
WScript.Echo "活跃状态:" & "空闲"
End If Dim NetConnectionStatus : NetConnectionStatus = "状态信息:"
Select Case Network.NetConnectionStatus
Case : NetConnectionStatus = NetConnectionStatus & "Disconnected"
Case : NetConnectionStatus = NetConnectionStatus & "Connecting"
Case : NetConnectionStatus = NetConnectionStatus & "Connected"
Case : NetConnectionStatus = NetConnectionStatus & "Disconnecting"
Case : NetConnectionStatus = NetConnectionStatus & "Hardware not present"
Case : NetConnectionStatus = NetConnectionStatus & "Hardware disabled"
Case : NetConnectionStatus = NetConnectionStatus & "Hardware malfunction"
Case : NetConnectionStatus = NetConnectionStatus & "Media disconnected"
Case : NetConnectionStatus = NetConnectionStatus & "Authenticating"
Case : NetConnectionStatus = NetConnectionStatus & "Authentication succeeded"
Case : NetConnectionStatus = NetConnectionStatus & "Authentication failed"
Case : NetConnectionStatus = NetConnectionStatus & "Invalid address"
Case : NetConnectionStatus = NetConnectionStatus & "Credentials required"
Case Else : NetConnectionStatus = NetConnectionStatus & "[NetConnectionStatus] " & Network.NetConnectionStatus
End Select
Wscript.Echo NetConnectionStatus WScript.Echo "=" Next
Set cNet = Nothing WScript.Echo End Sub '键盘信息
'参考:https://msdn.microsoft.com/en-us/library/aa394166%28v=vs.85%29.aspx
Sub KeyBoardInfo SetTitle "10.键盘信息" Set Keyboards = WMI.ExecQuery("Select * from Win32_Keyboard")
For Each Keyboard In Keyboards WScript.Echo "设备名称: " & Keyboard.Name
WScript.Echo "设备描述: " & Keyboard.Description
WScript.Echo "设备说明: " & Keyboard.Caption
WScript.Echo "功能键数量: " & Keyboard.NumberOfFunctionKeys Next WScript.Echo End Sub '电池信息
Sub BatteryInfo SetTitle "11.电池信息" Set Batterys = WMI.ExecQuery("Select * from Win32_Battery")
For Each Battery In Batterys WScript.Echo "设备名称: "& Battery.Name
WScript.Echo "设备描述: "& Battery.Description
WScript.Echo "设备说明: " & Battery.Caption Dim Chemistry : Chemistry = "电池类型:"
Select Case Battery.Chemistry
Case : Chemistry = Chemistry & "Other"
Case : Chemistry = Chemistry & "Unknown"
Case : Chemistry = Chemistry & "Lead Acid"
Case : Chemistry = Chemistry & "Nickel Cadmium"
Case : Chemistry = Chemistry & "Nickel Metal Hydride"
Case : Chemistry = Chemistry & "Lithium-ion"
Case : Chemistry = Chemistry & "Zinc air"
Case : Chemistry = Chemistry & "Lithium Polymer"
Case Else : Chemistry = Chemistry & "[Chemistry] " & Battery.Chemistry
End Select
WScript.Echo Chemistry WScript.Echo "设计容量: " & Battery.DesignCapacity & " milliwatt-hour(s)"
WScript.Echo "设计电压: " & Battery.DesignVoltage & " millivolt(s)"
Next WScript.Echo End Sub '指示设备信息
'参考:https://msdn.microsoft.com/en-us/library/aa394356.aspx
Sub PointingDeviceInfo SetTitle "12.指示设备信息" Set PointingDevices = WMI.ExecQuery("Select * from Win32_PointingDevice")
For Each PointingDevice In PointingDevices WScript.Echo "设备名称: "& PointingDevice.Name
WScript.Echo "设备描述: "& PointingDevice.Description
WScript.Echo "设备说明: " & PointingDevice.Caption
WScript.Echo "生产厂家: " & PointingDevice.Manufacturer Dim DeviceInterface : DeviceInterface = ""
Select Case PointingDevice.DeviceInterface
Case : DeviceInterface = DeviceInterface & "Other"
Case : DeviceInterface = DeviceInterface & "Unknown"
Case : DeviceInterface = DeviceInterface & "Serial"
Case : DeviceInterface = DeviceInterface & "PS/2"
Case : DeviceInterface = DeviceInterface & "Infrared"
Case : DeviceInterface = DeviceInterface & "HP-HIL"
Case : DeviceInterface = DeviceInterface & "Bus Mouse"
Case : DeviceInterface = DeviceInterface & "ADB (Apple Desktop Bus)"
Case : DeviceInterface = DeviceInterface & "Bus Mouse DB-9"
Case : DeviceInterface = DeviceInterface & "Bus Mouse Micro-DIN"
Case : DeviceInterface = DeviceInterface & "USB"
Case Else : DeviceInterface = DeviceInterface & "[DeviceInterface] " & PointingDevice.DeviceInterface
End Select
WScript.Echo DeviceInterface WScript.Echo "硬件类型: " & PointingDevice.HardwareType WScript.Echo "=" Next WScript.Echo End Sub '光驱设备
'参考:https://msdn.microsoft.com/en-us/library/aa394081.aspx
Sub CDROMDriveInfo SetTitle "13.光驱设备" Set CDROMDrives = WMI.ExecQuery("Select * from Win32_CDROMDrive")
For Each CDROMDrive In CDROMDrives WScript.Echo "设备名称: "& CDROMDrive.Name
WScript.Echo "设备描述: "& CDROMDrive.Description
WScript.Echo "设备说明: " & CDROMDrive.Caption
WScript.Echo "生产厂家: " & CDROMDrive.Manufacturer WScript.Echo "=" Next WScript.Echo End Sub '其他硬件
Sub OtherHardware 'SetTitle "其他信息" 'WScript.Echo End Sub '运行统计
Sub RunStats SetTitle "运行统计" WScript.Echo "检查开始时间:" & StartTime
WScript.Echo "检查结束时间:" & FinishTime
WScript.Echo "检查用时:" & DateDiff("s", StartTime, FinishTime) & " 秒" WScript.Echo End Sub
3)打印结果:Rhea_Result.txt
Microsoft (R) Windows Script Host Version 5.8
版权所有(C) Microsoft Corporation -。保留所有权利。 ----------.系统概览----------
生产厂家:Dell Inc.
当前用户:Tsybius-PC\Tsybius ----------.处理器信息----------
设备名称: Intel(R) Core(TM) i5-3230M CPU @ .60GHz
设备描述: x64 Family Model Stepping
设备说明: x64 Family Model Stepping
处理器标识: BFEBFBFF000306A9
处理器类型:Central Processor
处理器版本:
设备标识: CPU0
处理器家族:[Family Type]
处理器架构:x64
-
内核数量:
逻辑处理器数量:
地址长度:
数据长度:
处理速度: MHz
L2缓存: B
L3缓存: B
-
处理器状态:CPU Enabled
= ----------.主板信息----------
设备名称: Base Board
设备描述: Base Board
设备说明: Base Board
主板型号: 0F5PHF
主板版本: A00
制造厂商: Dell Inc.
序列号码: /5NL2NX1/CN1296137U0037/
-
是否底板: True
可热插拔: False
是否开启: True
可拆卸性: False
可替换性: True
-
硬件状态: OK
= ----------.内存信息----------
设备名称: Physical Memory
设备描述: Physical Memory
设备说明: Physical Memory
制造厂商: 830B
序列号码: 50E42805
-
数据宽度:
形状系数:SODIMM
容量统计: 4096MB
内存类型: Unknown
安放位置: Top Slot
行中位置:
- ----------.硬盘信息----------
设备名称:\\.\PHYSICALDRIVE0
设备描述: 磁盘驱动器
设备说明: HGST HTS725050A7E630 ATA Device
硬盘名称:HGST HTS725050A7E630 ATA Device
生产厂家:(标准磁盘驱动器)
硬盘序列号:2020202020204654353641354a57323244365636
硬盘具有以下能力:
Random Access
Supports Writing
-
硬盘默认分块大小:
硬盘最大分块大小:
硬盘最小分块大小:
硬盘扇区数:
硬盘柱面数:
硬盘总头数:
硬盘扇区数:
硬盘总道数:
硬盘总道数:
每柱磁道数:
固件版本:GH2OA560
接口类型:IDE
-
硬盘容量:465.759 GB
= ----------.显卡信息----------
设备名称: Intel(R) HD Graphics
设备描述: Intel(R) HD Graphics
设备说明: Intel(R) HD Graphics
制造厂商: Intel Corporation
视频架构:VGA
视频存储器类型:Unknown
视频处理器: Intel(R) HD Graphics Family
-
物理显存: MB
分辨率: *
单位像素比特数: Bit
刷新频率: Hz
= ----------.显示器信息----------
设备名称: 通用即插即用监视器
设备描述: 通用即插即用监视器
设备说明: 通用即插即用监视器
显示器类型: 通用即插即用监视器
生产厂家: (标准监视器类型)
-
屏幕高度:
屏幕宽度:
X轴每逻辑英寸像素数:
Y轴每逻辑英寸像素数:
显示模式:[DisplayType]
状态信息:[StatusInfo]
= ----------.声卡信息----------
设备名称: 英特尔(R) 显示器音频
设备描述: 英特尔(R) 显示器音频
设备说明: 英特尔(R) 显示器音频
制造厂商: Intel(R) Corporation
状态信息:Enabled
=
设备名称: IDT High Definition Audio CODEC
设备描述: IDT High Definition Audio CODEC
设备说明: IDT High Definition Audio CODEC
制造厂商: IDT
状态信息:Enabled
= ----------.网卡信息----------
设备名称: Broadcom NetXtreme Gigabit Ethernet
设备描述: Broadcom NetXtreme Gigabit Ethernet
设备说明: [] Broadcom NetXtreme Gigabit Ethernet
适配器型号: Ethernet 802.3
生产厂商: Broadcom
设备标识:
GUID: {9BC23D87-DADB-46E8-B542-DF0C6CAC7D7C}
MAC: F0:1F:AF::1A:A6
-
活跃状态:空闲
状态信息:Media disconnected
=
设备名称: Broadcom .11n 网络适配器
设备描述: Broadcom .11n 网络适配器
设备说明: [] Broadcom .11n 网络适配器
适配器型号: Ethernet 802.3
生产厂商: Broadcom
设备标识:
GUID: {689F2877-B076-44D2-ACC6-74520D616695}
MAC: ::8B:::
-
活跃状态:活跃
状态信息:Connected
=
设备名称: Microsoft Virtual WiFi Miniport Adapter
设备描述: Microsoft Virtual WiFi Miniport Adapter
设备说明: [] Microsoft Virtual WiFi Miniport Adapter
适配器型号: Ethernet 802.3
生产厂商: Microsoft
设备标识:
GUID: {237CCDA1-169E-4F13-A9F2-B6AD0F6190A3}
MAC: ::8B:::
-
活跃状态:空闲
状态信息:Media disconnected
= ----------.键盘信息----------
设备名称: Enhanced (- or -key)
设备描述: PS/ 标准键盘
设备说明: Enhanced (- or -key)
功能键数量: ----------.电池信息----------
设备名称: DELL MKD6223
设备描述: Internal Battery
设备说明: Internal Battery
电池类型:Lithium-ion
设计容量: milliwatt-hour(s)
设计电压: millivolt(s) ----------.指示设备信息----------
设备名称: USB 输入设备
设备描述: USB 输入设备
设备说明: USB 输入设备
生产厂家: (标准系统设备)
USB
硬件类型: USB 输入设备
=
设备名称: PS/ 兼容鼠标
设备描述: PS/ 兼容鼠标
设备说明: PS/ 兼容鼠标
生产厂家: Microsoft
PS/
硬件类型: PS/ 兼容鼠标
= ----------.光驱设备----------
设备名称: ZUPYDSN LARCTE3K SCSI CdRom Device
设备描述: CD-ROM Drive
设备说明: ZUPYDSN LARCTE3K SCSI CdRom Device
生产厂家: (标准 CD-ROM 驱动器)
=
设备名称: DTSOFT Virtual CdRom Device
设备描述: CD-ROM Drive
设备说明: DTSOFT Virtual CdRom Device
生产厂家: (标准 CD-ROM 驱动器)
= ----------运行统计----------
检查开始时间:// ::
检查结束时间:// ::
检查用时: 秒