color 2 
@echo off 
@rem bat command 
SETLOCAL 
title 欢迎启动你需要的服务 
rem 一个处理命令的开关,可以根据选择进行服务命令处理 
    
    
echo "环境变量查看" 
PATH 
echo  JAVA-HOME位置 "%JAVA_HOME%" 
echo  maven项目位置 "%maven_home%" 
echo  tomcat目录    "%CATALINA_HOME%" 
:begin 
echo  ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 
echo  ▓ 1    ▓启动sql数据库服务                                       ▓ 
echo  ▓ 2    ▓启动mysql数据库服务                                     ▓ 
echo  ▓ 3    ▓启动oracle数据库服务                                    ▓ 
echo  ▓ 4    ▓启动tomcat服务器                                        ▓ 
echo  ▓ 5    ▓启动weblogic服务                                        ▓ 
echo  ▓ 6    ▓启动myeclipse                                           ▓ 
echo  ▓ 7    ▓停止sql数据库服务                                       ▓ 
echo  ▓ 8    ▓停止mysql数据库服务                                     ▓ 
echo  ▓ 9    ▓停止oracle数据库服务                                    ▓ 
echo  ▓ 10   ▓启动版本控制服务                                        ▓ 
echo  ▓ 11   ▓退出                                                    ▓ 
echo  ▓ 12   ▓初始动作                                                ▓ 
echo  ▓ 13   ▓启动数据库                                              ▓ 
echo  ▓ 14   ▓关闭数据库                                              ▓ 
echo  ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 
echo . 
    
set isGoTo=true rem 设置一个变量控制是否启动多个服务 
    
set /p menunr=请根据数字选择你需要的服务 : 
    
IF %menunr%==1 (goto startSql) 
IF %menunr%==2 (goto StartMysql) 
IF %menunr%==3 (goto StartOracle) 
IF %menunr%==4 (goto tomcat) 
IF %menunr%==5 (goto weblogic) 
IF %menunr%==6 (goto myeclipse) 
IF %menunr%==7 (goto stopSql) 
IF %menunr%==8 (goto stopMysql) 
IF %menunr%==9 (goto stopOralce) 
IF %menunr%==10 (goto svn) 
IF %menunr%==11 (goto exit) 
IF %menunr%==12 (goto init) 
IF %menunr%==13 (goto start) 
IF %menunr%==14 (goto stop) 
    
:start 
set isGoTo=false 
call :startSql 
goto begin 
    
:stop 
set isGoTo=false 
call :stopSql 
    
goto begin 
    
:init 
rem 这里是启动平时常用程序 
C: 
cd \Program Files\Tencent\QQ\QQProtect\Bin\ 
start QQProtect.exe 
cd  \Program Files\Evernote\Evernote\ 
start Evernote.exe 
cd  \Documents and Settings\Administrator\Application Data\360se6\Application\ 
start 360se.exe 
explorer E:\workspace 
    
:startSql 
rem 启动sql数据库 
  net start mssqlserver 
  echo "sql数据库服务已启动"  
  if %isGoTo%==true   goto begin 
    
:startMysql 
rem 启动mysql数据库 
   net start mysql 
  echo "mysql数据库服务已启动" 
  if %isGoTo%==true   goto begin 
    
:startOracle 
    
  net start OracleMTSRecoveryService 
  net start OracleDbConsoleorcl 
  net start OracleServiceORCL 
  net start OracleOraDb11g_home1TNSListener 
    
  echo "oracle数据库服务已启动" 
    
  set isGoTo=true 
  goto begin 
     
:tomcat 
   E: 
   cd  \workspace\apache-tomcat-7.0.40\bin\ 
   start  startup.bat 
   echo tomcat服务器启动成功 
   goto begin 
:weblogic 
   E: 
   cd   \bea\user_projects\domains\base_domain\ 
   start  startWebLogic.cmd 
   echo tomcat服务器启动成功 
   goto begin 
:myeclipse 
    C: 
    cd  \Program Files\Genuitec\MyEclipse 8.5\ 
    start myeclipse.exe 
   echo myeclipse服务器启动成功 
   goto begin 
:stopSql 
  net stop mssqlserver 
  echo "sql数据库服务已停止" 
  if %isGoTo%==true   goto begin 
      
:stopMysql 
  net stop mysql 
  echo "mysql数据库服务已停止" 
  if %isGoTo%==true   goto begin 
     
:stopOralce 
  net  stop OracleMTSRecoveryService 
  net  stop OracleDbConsoleorcl 
  net  stop OracleServiceORCL 
  net  stop OracleOraDb11g_home1TNSListener 
  echo "oracle数据库服务已停止"  
  set isGoTo=true 
  goto begin 
:svn 
  cls 
  echo "版本控制服务端运行......" 
  svnserve -d -r E:\workspace\repository 
     
:exit 
  pause>nul 
:toTomatDir 
    
ENDLOCAL