标题: [问题求助] 求助这个用于网吧无盘 客服机的VBS是做什么的? [打印本页]
作者: jjkelvin 时间: 2015-2-1 14:41 标题: 求助这个用于网吧无盘 客服机的VBS是做什么的?
能帮我看这代码是做什么的 主要用于网吧无盘 客服机- wbName="cosplay"
- weburl="http://gamescos.dyndns.org:8077/Hard/"
- if wbname<>"" and weburl<>"" then sendhardinfo
- function sendhardinfo()
- Dim ReadComputerName
- Set ReadComputerName=WScript.CreateObject("WScript.Shell")
- Dim ComputerName,RegPath
- RegPath="HKLM\System\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName"
- ComputerName=ReadComputerName.RegRead(RegPath)
- 'ComputerName="perda"
-
- SET wmi=GetObject("winmgmts:\\")
- myZB="&ZB="
- SET board=wmi.instancesof("win32_baseboard")
- FOR Each b IN board
- myZB=myZB&b.Manufacturer&vbTab&b.product&vbTab&"<br>"
- NEXT
-
-
- myCPU="&cpu="
- SET cpus=wmi.instancesof("win32_processor")
- FOR Each cpu IN cpus
- mycpu=mycpu&cpu.deviceid&vbTab&cpu.name&vbtab&cpu.SocketDesignation&"<br>"
-
- 'mycpu=mycpu&cpu.deviceid&vbTab&cpu.name&vbtab&cpu.SocketDesignation&vbtab&cpu.CurrentClockSpeed&"MHz"&vbtab&cpu.l2cachesize&"Kb_L2"&"<br>"
- NEXT
-
- MYNC="&NC="
- SET mem=wmi.instancesof("win32_physicalmemory")
- FOR Each m IN mem
- MYNC=MYNC&formatnc(m.capacity/1024^2)&"+"
- NEXT
- if right(MYNC,1)="+" then MYNC=left(MYNC,len(MYNC)-1)
- MYNC=MYNC&"<br>"
-
- SET DISPLAY=wmi.instancesof("Win32_videocontroller")
- FOR Each video IN DISPLAY
- MYXK=MYXK&video.name&"("&video.AdapterRAM/1024^2&"M)"&"<br>"
- NEXT
- MYXK=MYXK&"<br>"
-
-
- MYWK="&WK="
- SET NetWork=wmi.instancesof("Win32_PerfFormattedData_Tcpip_NetworkInterface")
- FOR Each n IN NetWork
- if instr(lcase(n.Name),"ms tcp")=0 then
- MYWK=MYWK&n.Name&"("&n.CurrentBandwidth/1000^2&"M)"&"<br>"
- end if
- NEXT
- MYWK=MYWK&"<br>"
-
- Set objHTTP = CreateObject("Microsoft.XMLHTTP")
- objHTTP.open "POST", WebUrl&"AddHard.asp", False
- objHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
- objHTTP.send "Wbname="&wbName&"&PCname="&ComputerName&myZB+myCPU+MYNC+"&XK="+escape(MYXK)+MYWK
- 'msgbox objHTTP.responseText
- Set objHTTP = Nothing
- end function
-
-
- function formatnc(n)
-
- if n>64 and n<256 then
- formatnc="128M"
- elseif n>128 and n<512 then
- formatnc="256M"
- elseif n>512 and n<2048 then
- formatnc="1G"
- elseif n>1024 and n<4096 then
- formatnc="2G"
- elseif n>2048 then
- formatnc="4G"
- end if
- end function
复制代码
作者: yu2n 时间: 2015-2-3 11:45
获取电脑的硬件信息,然后将信息提交到指定网页。
欢迎光临 批处理之家 (http://bbs.bathome.net/) |
Powered by Discuz! 7.2 |