Rhea_HardwareInfoCollector.vbs代码(获取电脑硬件信息):
'On Error Resume Next
If WScript.Arguments.Count >= 1 Then
Select Case WScript.Arguments(0)
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(0)
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(0)
End Select
End If
Set WMI =GetObject("Winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Dim Family : Family = "处理器家族:"
Select Case CPU.Family
Case 1 : Family = Family &"Other"
Case 2 : Family = Family &"Unknown"
Case 3 : Family = Family &"8086"
Case 4 : Family = Family &"80286"
Case 5 : Family = Family &"Intel386(TM) Processor"
Case 6 : Family = Family &"Intel486(TM) Processor"
Case 7 : Family = Family &"8087"
Case 8 : Family = Family &"80287"
Case 9 : Family = Family &"80387"
Case 10 : Family = Family &"80487"
Case 11 : Family = Family &"Pentium Brand"
Case 12 : Family = Family &"Pentium Pro"
Case 13 : Family = Family &"Pentium II"
Case 14 : Family = Family &"Pentium Processor with MMX(TM) Technology"
Case 15 : Family = Family &"Celeron(TM)"
Case 16 : Family = Family &"Pentium II Xeon(TM)"
Case 17 : Family = Family &"Pentium III"
Case 18 : Family = Family &"M1 Family"
Case 19 : Family = Family &"M2 Family"
Case 24 : Family = Family &"AMD Duron(TM) Processor Family"
Case 25 : Family = Family &"K5 Family"
Case 26 : Family = Family &"K6 Family"
Case 27 : Family = Family &"K6-2"
Case 28 : Family = Family &"K6-3"
Case 29 : Family = Family &"AMD Athlon(TM) Processor Family"
Case 30 : Family = Family &"AMD2900 Family"
Case 31 : Family = Family &"K6-2+"
Case 32 : Family = Family &"Power PC Family"
Case 33 : Family = Family &"Power PC 601"
Case 34 : Family = Family &"Power PC 603"
Case 35 : Family = Family &"Power PC 603+"
Case 36 : Family = Family &"Power PC 604"
Case 37 : Family = Family &"Power PC 620"
Case 38 : Family = Family &"Power PC X704"
Case 39 : Family = Family & "Power PC 750"
Case 48 : Family = Family &"Alpha Family"
Case 49 : Family = Family &"Alpha 21064"
Case 50 : Family = Family &"Alpha 21066"
Case 51 : Family = Family &"Alpha 21164"
Case 52 : Family = Family &"Alpha 21164PC"
Case 53 : Family = Family &"Alpha 21164a"
Case 54 : Family = Family &"Alpha 21264"
Case 55 : Family = Family &"Alpha 21364"
Case 64 : Family = Family &"MIPS Family"
Case 65 : Family = Family &"MIPS R4000"
Case 66 : Family = Family &"MIPS R4200"
Case 67 : Family = Family &"MIPS R4400"
Case 68 : Family = Family &"MIPS R4600"
Case 69 : Family = Family &"MIPS R10000"
Case 80 : Family = Family &"SPARC Family"
Case 81 : Family = Family &"SuperSPARC"
Case 82 : Family = Family &"microSPARC II"
Case 83 : Family = Family &"microSPARC IIep"
Case 84 : Family = Family &"UltraSPARC"
Case 85 : Family = Family &"UltraSPARC II"
Case 86 : Family = Family &"UltraSPARC IIi"
Case 87 : Family = Family &"UltraSPARC III"
Case 88 : Family = Family &"UltraSPARC IIIi"
Case 96 : Family = Family &"68040"
Case 97 : Family = Family &"68xxx Family"
Case 98 : Family = Family &"68000"
Case 99 : Family = Family &"68010"
Case 100 : Family = Family &"68020"
Case 101 : Family = Family &"68030"
Case 112 : Family = Family &"Hobbit Family"
Case 120 : Family = Family &"Crusoe(TM) TM5000 Family"
Case 121 : Family = Family &"Crusoe(TM) TM3000 Family"
Case 122 : Family = Family &"Efficeon(TM) TM8000 Family"
Case 128 : Family = Family &"Weitek"
Case 130 : Family = Family &"Itanium(TM) Processor"
Case 131 : Family = Family &"AMD Athlon(TM) 64 Processor Family"
Case 132 : Family = Family &"AMD Opteron(TM) Processor Family"
Case 144 : Family = Family &"PA-RISC Family"
Case 145 : Family = Family &"PA-RISC 8500"
Case 146 : Family = Family &"PA-RISC 8000"
Case 147 : Family = Family &"PA-RISC 7300LC"
Case 148 : Family = Family &"PA-RISC 7200"
Case 149 : Family = Family &"PA-RISC 7100LC"
Case 150 : Family = Family &"PA-RISC 7100"
Case 160 : Family = Family &"V30 Family"
Case 176 : Family = Family &"Pentium III Xeon(TM) Processor"
Case 177 : Family = Family &"Pentium III Processor with Intel SpeedStep(TM) Technology"
Case 178 : Family = Family &"Pentium 4"
Case 179 : Family = Family &"Intel Xeon(TM)"
Case 180 : Family = Family &"AS400 Family"
Case 181 : Family = Family &"Intel Xeon(TM) Processor MP"
Case 182 : Family = Family &"AMD Athlon(TM) XP Family"
Case 183 : Family = Family &"AMD Athlon(TM) MP Family"
Case 184 : Family = Family &"Intel Itanium 2"
Case 185 : Family = Family &"Intel Pentium M Processor"
Case 190 : Family = Family &"K7"
Case 198 : Family = Family &"Intel Core(TM) i7-2760QM"
Case 200 : Family = Family &"IBM390 Family"
Case 201 : Family = Family &"G4"
Case 202 : Family = Family &"G5"
Case 203 : Family = Family &"G6"
Case 204 : Family = Family &"z/Architecture Base"
Case 250 : Family = Family &"i860"
Case 251 : Family = Family &"i960"
Case 260 : Family = Family &"SH-3"
Case 261 : Family = Family &"SH-4"
Case 280 : Family = Family &"ARM"
Case 281 : Family = Family &"StrongARM"
Case 300 : Family = Family &"6x86"
Case 301 : Family = Family &"MediaGX"
Case 302 : Family = Family &"MII"
Case 320 : Family = Family &"WinChip"
Case 350 : Family = Family &"DSP"
Case 500 : 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 0 : Architecture = Architecture & "x86"
Case 1 : Architecture = Architecture & "MIPS"
Case 2 : Architecture = Architecture & "Alpha"
Case 3 : Architecture = Architecture & "PowerPC"
Case 5 : Architecture = Architecture & "ARM"
Case 6 : Architecture = Architecture & "Itanium-basedsystems"
Case 9 : Architecture = Architecture & "x64"
Case Else : Architecture = Architecture & "[Architecture]" & CPU.Architecture
End Select
WScript.Echo Architecture
WScript.Echo "硬盘具有以下能力:"
For Each Capability In Disk.Capabilities
Select Case Capability
Case 0 : WScript.Echo"Unknown"
Case 1 : WScript.Echo"Other"
Case 2 : WScript.Echo"Sequential Access"
Case 3 : WScript.Echo"Random Access"
Case 4 : WScript.Echo"Supports Writing"
Case 5 : WScript.Echo"Encryption"
Case 6 : WScript.Echo"Compression"
Case 7 : WScript.Echo"Supports Removable Media"
Case 8 : WScript.Echo"Manual Cleaning"
Case 9 : WScript.Echo"Automatic Cleaning"
Case 10 : WScript.Echo"SMART Notification"
Case 11 : WScript.Echo"Supports Dual-Sided Media"
Case 12 : WScript.Echo"Ejection Prior to Drive Dismount Not Required"
Case Else : WScript.Echo"-"
End Select
Next
End Sub
------------------------------------------------------------------------------------------------------------
弹框vbs代码:
Dim department,name,display
department=InputBox("请输入部门")
name=InputBox("请输入姓名")
display=InputBox("请输入显示器")
Setfso=CreateObject("scripting.filesystemobject")
Setfi=fso.opentextfile("D:\down\Rhea_Result.txt",8)
s="部门:"&department&vbCrLf&"姓名:"&name&vbCrLf&"显示器:"&display
fi.write s
fi.Close