零全零美(www.zzgwt.com)
          生活中的很多事情,并不像If...Else那么簡單!
          posts - 96,comments - 52,trackbacks - 0
           內存越來越大,裝的程序也越來越多,平時工作時Myeclipse、PowerDesigner、Dreamweaver、Tomcat、Plsqldev開了一大堆!很多經常用,但又不是每次都用到的程序,如Oracle、Mysql、VMware,設置自啟動太浪費內存,設置為手動有必須每次一個一個的找到分別啟動,很是麻煩!

               這個批處理(以VMware為例)可以讓你動動鼠標即可以自動開啟和關閉服務!

          @echo off

          for /"skip=3 tokens=4" %%i in ('sc query VMAuthdService'do set "zt=%%i" &goto :next 

          :next 
          if /"%zt%"=="RUNNING" ( 
              
          goto stop
          else ( 
              
          goto start

          pause 


          :stop
              set 
          /p input=the VMware service is running now ,do you want to stop it? (y or other for yes,n for no,default for y):
              
          if /"%input%" == "n" (
                  
          goto :eof
              )
          net stop 
          "VMware Authorization Service"
          net stop 
          "VMware DHCP Service"
          net stop 
          "VMware NAT Service"
          net stop 
          "VMware Virtual Mount Manager Extended"
          pause
          goto :eof

          :start
              set 
          /p input=the VMware service is stoped now ,do you want to start it? (y or other for yes,n for no,default for y): 
              
          if /"%input%" == "n" (
                  
          goto :eof
              )
          net start 
          "VMware Authorization Service"
          net start 
          "VMware DHCP Service"
          net start 
          "VMware NAT Service"
          net start 
          "VMware Virtual Mount Manager Extended"
          pause
          goto :eof
          posted on 2009-11-23 11:30 零全零美 閱讀(792) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 五华县| 衢州市| 锦州市| 兴义市| 芜湖县| 荃湾区| 松原市| 宁远县| 乌鲁木齐市| 永顺县| 长武县| 土默特左旗| 台前县| 南涧| 亳州市| 泗阳县| 通化县| 多伦县| 杭州市| 玉屏| 韩城市| 合江县| 元氏县| 海晏县| 登封市| 东乌珠穆沁旗| 会昌县| 镇雄县| 仪征市| 平塘县| 金秀| 甘南县| 巩义市| 个旧市| 湘西| 木里| 介休市| 黎城县| 清河县| 锦州市| 磴口县|