Created
August 4, 2016 12:52
-
-
Save hklcf/d4ee1b11295c17b4bd353509e64deb57 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
cls | |
echo. | |
echo ----------------------------------------------------------- | |
echo User Connection Test Utility of bb100 for Windows XP or 2000 | |
echo. | |
echo This program is owned by Hong Kong Broadband Network Ltd. | |
echo. | |
echo For a Accurate Results, | |
echo. | |
echo please DON'T perform any task when the utility is running. | |
echo ------------------------------------------------------------ | |
echo. | |
:: | |
:: make directory for file storage | |
:: | |
:START | |
echo Processing ... Please wait | |
cd \ | |
mkdir c:\hkbntesting | |
:: | |
:: download and upload speedtest | |
:: | |
echo open download.speedtest.com.hk > c:\hkbntesting\dl.txt | |
echo binary >> c:\hkbntesting\dl.txt | |
echo hash >> c:\hkbntesting\dl.txt | |
echo lcd /hkbntesting >> c:\hkbntesting\dl.txt | |
echo get 100MBvideo.zip >> c:\hkbntesting\dl.txt | |
echo quit >> c:\hkbntesting\dl.txt | |
:: | |
:: | |
echo open upload.speedtest.com.hk > c:\hkbntesting\ul.txt | |
echo binary >> c:\hkbntesting\ul.txt | |
echo hash >> c:\hkbntesting\ul.txt | |
echo lcd /hkbntesting >> c:\hkbntesting\ul.txt | |
echo put 100MBvideo.zip >> c:\hkbntesting\ul.txt | |
echo quit >> c:\hkbntesting\ul.txt | |
:: | |
:: | |
echo Start Download Test | |
echo File is downloading............. | |
ftp.exe -A -s:c:\hkbntesting\dl.txt >> c:\hkbntesting\download | type c:\hkbntesting\download | |
echo Download Test Completed | |
echo. | |
echo Start Upload Test | |
echo File is uploading............. | |
ftp.exe -A -s:c:\hkbntesting\ul.txt >> c:\hkbntesting\upload | type c:\hkbntesting\upload | |
echo Upload Test Completed | |
echo. | |
:: | |
:: | |
findstr ftp: c:\hkbntesting\download > c:\hkbntesting\download2 | |
SET downA= | |
SET downB= | |
SET downC= | |
SET downBB= | |
SET downCC= | |
SET x= | |
SET x=ftp: | |
for /f "tokens=2" %%S in ('find "%x%" ^<c:\hkbntesting\download2') do (set downA=%%S) | |
for /f "tokens=6" %%S in ('find "%x%" ^<c:\hkbntesting\download2') do (set downB=%%S) | |
for /f "tokens=7" %%S in ('find "%x%" ^<c:\hkbntesting\download2') do (set downC=%%S) | |
SET downBB=%downB:Seconds=% | |
SET downCC=%downC:Kbytes/sec.=% | |
:: | |
findstr ftp: c:\hkbntesting\upload > c:\hkbntesting\upload2 | |
SET upA= | |
SET upB= | |
SET upC= | |
SET upBB= | |
SET upCC= | |
for /f "tokens=2" %%S in ('find "%x%" ^<c:\hkbntesting\upload2') do (set upA=%%S) | |
for /f "tokens=6" %%S in ('find "%x%" ^<c:\hkbntesting\upload2') do (set upB=%%S) | |
for /f "tokens=7" %%S in ('find "%x%" ^<c:\hkbntesting\upload2') do (set upC=%%S) | |
SET upBB=%upB:Seconds=% | |
SET upCC=%upC:Kbytes/sec.=% | |
:: | |
@echo off | |
cd \ | |
cd c:\hkbntesting | |
del 100MBvideo.zip | |
del c:\hkbntesting\ul.txt | |
del c:\hkbntesting\dl.txt | |
echo. | |
echo. | |
echo ------------------------------------------------------------ | |
echo Please wait for the Results to Popup | |
echo. | |
echo ------------------------------------------------------------ | |
echo. | |
echo. | |
echo Completed | |
echo. | |
start iexplore http://reg.hkbn.net/DosPatch_Pin ... tm?DOWNsize=%downA%^&DOWNduration=%downBB%^&DOWNspeed=%downCC%^&UPsize=%upA%^&UPduration=%upBB%^&UPspeed=%upCC% | |
del c:\hkbntesting\download | |
del c:\hkbntesting\upload | |
del c:\hkbntesting\download2 | |
del c:\hkbntesting\upload2 | |
:END1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment