- @echo off&setlocal enabledelayedexpansion
- rem 黑马论坛回复计时、提醒
- rem 2015年11月29日
- rem Author xin3283@qq.com
- set path=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
- set /a n=5
- rem 将 %0 扩展到一个完全合格的路径名jpa
- set jpa=%~f0
- set runOne=%SystemRoot%\runOne.vbs
- set runEnd=%SystemRoot%\runEnd.vbs
- set runWaitCalc=%SystemRoot%\runWaitCalc.bat
- if "%1" == "uninstall" (
- del /q %runOne% %runEnd% %runWaitCalc%
- echo 相关文件已全部删除&exit /b 0
- )
- echo.msgbox"%n%次回复完成" ,48,"提示" >%runEnd%
- if not exist %runWaitCalc% call :wait
- rem 执行控制
- for /l %%i in (1,1,%n%) do (
- echo 第%%i次
- call :runOneCode %%i
- if "%%i"=="%n%" call runEnd.vbs&exit /b 0
- call runWaitCalc.bat
- )
- :wait
- rem 获取文本行数、取出每行内容、获取yu_rename关键字行数、存放至%runWaitCalc%
- for /f "tokens=1" %%i in ('type %jpa%^|find /v "" /c') do set /a rows=%%i
- (for /l %%i in (1,1,%rows%) do set /p row%%i=)<%jpa%
- for /f "tokens=1 delims=:" %%i in ('type %jpa%^|findstr /b /n "yu_rename"') do set /a begin=%%i
- set /a begin+=1
- for /l %%i in (%begin%,1,%rows%) do @(
- echo !row%%i!
- )>>%runWaitCalc%
- goto :eof
- :runOneCode
- set /a code=%1
- echo.msgbox"第%code%次" +chr(13)+"回复完成后点我确定" ,64,"提示" >%runOne%
- call %runOne%
- goto :eof
- yu_rename 2>nul
- @echo off&set /a count=60
- :re
- ping /w 1000 /n 1 10.99.99.9 >nul&set /a count-=1
- cls&echo 下次可回复倒计时:%count%
- if "%count%" GTR "0" goto :re
复制代码
卸载相关文件方法:cmd界面下 文件名 + uninstall
|
|