|
|
发表于 2015-9-16 23:08:12
|
显示全部楼层
本帖最后由 pcl_test 于 2015-9-16 23:09 编辑
- @echo off
- MODE con: COLS=55 LINES=20
- if "%~1" neq "" goto :%1
- :main
- cls
- echo======================================================
- tasklist|find /i "winrar.exe" >nul&& echo █ 提 示 █【rar已启动】||echo █ 提 示 █【rar未启动】
- echo======================================================
- echo.
- echo 请按相应数字键选择所需功能
- echo.
- echo======================================================
- echo=
- echo= 1.结束rar
- echo=
- echo= 2.启动rar
- echo=
- echo= 3.重启rar
- echo=
- echo= 4.退出
- echo=
- echo======================================================
- set choice=
- set /p choice=请输入要选择功能后回车:
- if "%choice%"=="1" goto kill
- if "%choice%"=="2" goto run
- if "%choice%"=="3" goto restart
- if "%choice%"=="4" exit
- goto main
- :kill
- taskkill /f /im winrar.exe && echo 结束rar成功 || echo 结束rar失败
- if "%~1" neq "" exit
- ping /n 3 0 >nul&goto main
- :run
- start "" "%ProgramFiles%\WinRAR\WinRAR.exe"
- if "%~1" neq "" exit
- goto main
- :restart
- cls
- taskkill /f /im "winrar.exe"
- goto run
复制代码 |
|