中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 会员 | 搜索 | 上传 | 帮助 »
中国DOS联盟论坛 » 论坛回收站 » 请问这个VBS输出在哪?
作者:
标题: 请问这个VBS输出在哪? 上一主题 | 下一主题
kidzgy
中级用户





积分 262
发帖 129
注册 2007-7-11
状态 离线
『楼 主』:  请问这个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,双击忙一下,就没反映了。

怎么样生成对话框看信息?

2009-8-15 05:33
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
newxso
初级用户

l i u s s


积分 73
发帖 101
注册 2008-9-17
来自 GZ
状态 离线
『第 2 楼』:  

乱堆放的内容当然没有反应。完整版本:

http://www.jb51.net/article/14344.htm

[ Last edited by newxso on 2009-8-15 at 09:29 ]

2009-8-15 09:07
查看资料  发短消息 网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: