[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[问题求助] 求助这个用于网吧无盘 客服机的VBS是做什么的?

能帮我看这代码是做什么的 主要用于网吧无盘 客服机
  1. wbName="cosplay"
  2. weburl="http://gamescos.dyndns.org:8077/Hard/"
  3. if wbname<>"" and weburl<>"" then sendhardinfo
  4. function sendhardinfo()
  5. Dim ReadComputerName
  6. Set ReadComputerName=WScript.CreateObject("WScript.Shell")
  7. Dim ComputerName,RegPath
  8. RegPath="HKLM\System\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName"
  9. ComputerName=ReadComputerName.RegRead(RegPath)
  10. 'ComputerName="perda"
  11. SET wmi=GetObject("winmgmts:\\")
  12. myZB="&ZB="
  13. SET board=wmi.instancesof("win32_baseboard")
  14. FOR Each b IN board
  15.     myZB=myZB&b.Manufacturer&vbTab&b.product&vbTab&"<br>"
  16. NEXT
  17. myCPU="&cpu="
  18. SET cpus=wmi.instancesof("win32_processor")
  19. FOR Each cpu IN cpus
  20.     mycpu=mycpu&cpu.deviceid&vbTab&cpu.name&vbtab&cpu.SocketDesignation&"<br>"
  21. 'mycpu=mycpu&cpu.deviceid&vbTab&cpu.name&vbtab&cpu.SocketDesignation&vbtab&cpu.CurrentClockSpeed&"MHz"&vbtab&cpu.l2cachesize&"Kb_L2"&"<br>"
  22. NEXT
  23. MYNC="&NC="
  24. SET mem=wmi.instancesof("win32_physicalmemory")
  25. FOR Each m IN mem
  26.     MYNC=MYNC&formatnc(m.capacity/1024^2)&"+"
  27. NEXT
  28. if right(MYNC,1)="+" then MYNC=left(MYNC,len(MYNC)-1)
  29. MYNC=MYNC&"<br>"
  30. SET DISPLAY=wmi.instancesof("Win32_videocontroller")
  31. FOR Each video IN DISPLAY
  32. MYXK=MYXK&video.name&"("&video.AdapterRAM/1024^2&"M)"&"<br>"
  33. NEXT
  34. MYXK=MYXK&"<br>"
  35. MYWK="&WK="
  36. SET NetWork=wmi.instancesof("Win32_PerfFormattedData_Tcpip_NetworkInterface")
  37. FOR Each n IN NetWork
  38.     if instr(lcase(n.Name),"ms tcp")=0 then
  39. MYWK=MYWK&n.Name&"("&n.CurrentBandwidth/1000^2&"M)"&"<br>"
  40.     end if
  41. NEXT  
  42. MYWK=MYWK&"<br>"
  43. Set objHTTP = CreateObject("Microsoft.XMLHTTP")
  44. objHTTP.open "POST", WebUrl&"AddHard.asp", False
  45. objHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
  46. objHTTP.send "Wbname="&wbName&"&PCname="&ComputerName&myZB+myCPU+MYNC+"&XK="+escape(MYXK)+MYWK
  47. 'msgbox objHTTP.responseText
  48. Set objHTTP = Nothing
  49. end function
  50. function formatnc(n)
  51. if n>64 and n<256 then
  52.     formatnc="128M"
  53. elseif n>128 and n<512 then
  54.     formatnc="256M"
  55. elseif n>512 and n<2048 then
  56.     formatnc="1G"
  57. elseif n>1024 and n<4096 then
  58.     formatnc="2G"
  59. elseif n>2048 then
  60.     formatnc="4G"
  61. end if
  62. end function
复制代码

获取电脑的硬件信息,然后将信息提交到指定网页。
『千江有水千江月』千江有水,月映千江;万里无云,万里青天。    http://yu2n.qiniudn.com/

TOP

返回列表