@echo off
:dosmenu
REM 选择菜单
echo #**********************************************************************#
echo Windows 服务启动脚本 made by 黄金进 2010年10月5日
echo #**********************************************************************#
echo 命令相关参数说明如下 快速切换
echo #**********************************************************************#
echo.
echo [1]启动mysql [2]关闭mysql
echo [3]启动sqlserver [4]关闭sqlserver
echo [5]启动oracle [6]关闭oracle 其它键退出本程序
echo.
echo #**********************************************************************#
set /P CHS= 请选择: [1],[2],[3],[4],[5],[6]?
if /I "%CHS%"=="1" (
goto mysqlStart
)
if /I "%CHS%"=="2" (
goto mysqlStop
)
if /I "%CHS%"=="3" (
goto MSSqlStart
)
if /I "%CHS%"=="4" (
goto MSSqlStop
)
if /I "%CHS%"=="5" (
goto OracleStart
)
if /I "%CHS%"=="6" (
goto OracleStop
)
goto quitOut
:mysqlStart
REM 启动mysql
net start MySQL
pause
cls
goto dosmenu
:mysqlStop
REM 关闭mysql
net stop MySQL
pause
cls
goto dosmenu
:MSSqlStart
REM 启动sqlserver2005
net start "SQL Server (MSSQLSERVER)"
pause
cls
goto dosmenu
:MSSqlStop
REM 关闭sqlserver2005
net stop "SQL Server (MSSQLSERVER)"
pause
cls
goto dosmenu
:OracleStart
REM 启动OracleService
net start "OracleServiceORACLE"
net start "OracleOraHome92TNSListener"
pause
cls
goto dosmenu
:OracleStop
REM 关闭OracleService
net stop "OracleOraHome92TNSListener"
net stop "OracleServiceORACLE"
pause
cls
goto dosmenu
:quitOut
REM 退出
exit