『楼 主』:
请问这个VBS输出在哪?
Function OutInfo(objRemote)
Dim OutFile, arrInfo, strOutInfo, Tmp, A
If FSO.FileExists(InfoOutFile) Then
Set OutFile = FSO.OpenTextFile(InfoOutFile,8)
Else
Set OutFile = FSO.CreateTextFile(InfoOutFile)
OutFile.Writeline "计算机名,系统(初装日期),主板型号(厂商)(发行日期),CPU型号(接口类型),外频,L2容量(速度)," & _
"内存总量,内存速度(位置),内存类型(封装类型),硬盘型号(容量),显卡型号(显存),网卡,IP/MAC"
End If
'系统
arrInfo = GetOSInfo(objRemote)
If Vartype(arrInfo) = 8 Then
OutInfo = arrInfo
Exit Function
End If
strOutInfo = arrInfo(0) & "," & arrInfo(1) & "(" & arrInfo(2) & "),"
'主板
arrInfo = GetBoardInfo(objRemote)
If Vartype(arrInfo) = 8 Then
OutInfo = arrInfo
Exit Function
End If
strOutInfo = strOutInfo & arrInfo(0) & "(" & arrInfo(1) & ")"
'BIOS
arrInfo = GetBIOSInfo(objRemote)
If Vartype(arrInfo) = 8 Then
OutInfo = arrInfo
Exit Function
End If
strOutInfo = strOutInfo & "(" & arrInfo(2) & "),"
'CPU
arrInfo = GetCPUInfo(objRemote)
If Vartype(arrInfo) = 8 Then
OutInfo = arrInfo
Exit Function
End If
strOutInfo = strOutInfo & arrInfo(1) & "(" & arrInfo(8) & ")," & arrInfo(4) & "," & _
arrInfo(6) & "(" & arrInfo(7) & "),"
'内存
arrInfo = GetMemoryInfo(objRemote)
If Vartype(arrInfo) = 8 Then
OutInfo = arrInfo
Exit Function
End If
Tmp = 0
For A = 1 To Ubound(arrInfo) Step 6
Tmp = Tmp + Cint(arrInfo(A))
Next
strOutInfo = strOutInfo & arrInfo(0) & "条,共" & Tmp & "M,"
Tmp = ""
For A = 2 To Ubound(arrInfo) Step 6
If A = Ubound(arrInfo) - 4 Then
Tmp = Tmp & arrInfo(A) & "(" & arrInfo(A+1) & "),"
Else
Tmp = Tmp & arrInfo(A) & "(" & arrInfo(A+1) & ") "
End If
Next
strOutInfo = strOutInfo & Tmp
Tmp = ""
For A = 4 To Ubound(arrInfo) Step 6
If A = Ubound(arrInfo) - 2 Then
Tmp = Tmp & arrInfo(A) & "(" & arrInfo(A+1) & "),"
Else
Tmp = Tmp & arrInfo(A) & "(" & arrInfo(A+1) & ") "
End If
Next
strOutInfo = strOutInfo & Tmp
'硬盘
Tmp = ""
arrInfo = GetDiskInfo(objRemote)
If Vartype(arrInfo) = 8 Then
OutInfo = arrInfo
Exit Function
End If
For A = 1 To Ubound(arrInfo) Step 5
If arrInfo(A+1) = "IDE" Then
Tmp = arrInfo(A) & "(" & arrInfo(A+2) & "G),"
Exit For
End If
Next
If Tmp = "" Then
strOutInfo = strOutInfo & "硬盘型号未检索到,"
Else
strOutInfo = strOutInfo & Tmp
End If
'显卡
arrInfo = GetVideoInfo(objRemote)
If Vartype(arrInfo) = 8 Then
OutInfo = arrInfo
Exit Function
End If
strOutInfo = strOutInfo & arrInfo(0) & "(" & arrInfo(1) & "M),"
'网卡
arrInfo = GetNetworkInfo(objRemote)
If Vartype(arrInfo) = 8 Then
OutInfo = arrInfo
Exit Function
End If
strOutInfo = strOutInfo & arrInfo(1) & "," & arrInfo(2) & Space(17-Len(arrInfo(2))) & arrInfo(3)
'输出
OutFile.Writeline strOutInfo
intCount1 = intCount1 + 1
OutInfo = True
End Function 保存成VBS,双击忙一下,就没反映了。
怎么样生成对话框看信息?
|