日期:2014-05-16 浏览次数:20374 次
@echo off mode con lines=25 title 重启OracleServiceGAOSU服务 color 1f cls echo 正在停止OracleServiceGAOSU net stop "OracleServiceGAOSU" echo ---延迟5秒--- choice /N /C y /T 5 /D y>nul echo. echo 正在启动OracleServiceGAOSU net start "OracleServiceGAOSU" echo ---延迟5秒--- choice /N /C y /T 5 /D y>nul echo. echo 正在检测OracleServiceGAOSU服务是否启动成功... echo. for /f "skip=3 tokens=4" %%i in ('sc query OracleServiceGAOSU') do set "zt=%%i" &goto :next :next if /i "%zt%" == "STOPPED" ( echo OracleServiceGAOSU尚未运行,现在启动 ... net start OracleServiceGAOSU )else if /i "%zt%" == "RUNNING" ( echo OracleServiceGAOSU 服务已启动成功 。 ) echo 按任意键退出 pause>nul
?