スポンサーサイト
一定期間更新がないため広告を表示しています
このブログのテーマ:
Linuxをいじる Windowsを飼い慣らす Solarisに悩む Firefoxを使い倒す Thunderbirdを使い倒す
W-ZERO3で仕事する Mindmap(マインドマップ)で仕事する
WRC(世界ラリー選手権)を観る 車を走らせる
日常の非日常を記録する
一定期間更新がないため広告を表示しています
なお、このバッチを使う前に、以下のサービスを手動起動に切り替えておくことをお忘れなく。
VMware Authorization Service
VMware DHCP Service
VMware Host Agent
VMware NAT Service
VMware Virtual Infrastructure Web Access
:: VMware Server Service ON/OFF Switch for VMware Server 2.0
:: File Version : 1.0
:: Usage : .¥VmWareServiceSwitch.bat
::
::
@echo off
:: Local Variable Mode
setlocal
:: Define Variable
set statetype=0
:: Check Service Status and Define Service Stateus Matrix
::
:: This FLAG(%statetype%;11111) will be Matrix.
:: In future the FLAG will have switch motion each service.
::
sc query "VMAuthdService" | findstr "RUNNING" > NUL
if %errorlevel%==0 set /a statetype=%statetype%+10000
sc query "VMwareHostd" | findstr "RUNNING" > NUL
if %errorlevel%==0 set /a statetype=%statetype%+1000
sc query "VMnetDHCP" | findstr "RUNNING" > NUL
if %errorlevel%==0 set /a statetype=%statetype%+10
sc query "VMware NAT Service" | findstr "RUNNING" > NUL
if %errorlevel%==0 set /a statetype=%statetype%+100
sc query "webAccess" | findstr "RUNNING" > NUL
if %errorlevel%==0 set /a statetype=%statetype%+1
:: Case stop or start
IF %statetype% == 11111 goto ALLSTOP
IF not %statetype% == 11111 goto ALLSTART
:ALLSTOP
::All VMware Service stop
net stop "VMwareHostd"
net stop "VMAuthdService"
net stop "webAccess"
net stop "VMware NAT Service"
net stop "VMnetDHCP"
goto END
:ALLSTART
::All VMware Service start
sc query "VMnetDHCP" | findstr "RUNNING" > NUL
if not %errorlevel%==0 net start "VMnetDHCP"
sc query "VMware NAT Service" | findstr "RUNNING" > NUL
if not %errorlevel%==0 net start "VMware NAT Service"
sc query "webAccess" | findstr "RUNNING" > NUL
if not %errorlevel%==0 net start "webAccess"
sc query "VMAuthdService" | findstr "RUNNING" > NUL
if not %errorlevel%==0 net start "VMAuthdService"
sc query "VMwareHostd" | findstr "RUNNING" > NUL
if not %errorlevel%==0 net start "VMwareHostd"
goto END
:END
:: If EnvVariable remains, you will cut "::" below line.
::set statetype=
:: End of Local Variable Mode
endlocal
⇒ KOHEI (02/01)
⇒ momoch (01/28)
⇒ ドリフト (01/27)
⇒ sac (12/13)
⇒ 風水太郎 (11/27)
⇒ momoch (09/20)
⇒ sac (09/19)
⇒ momoch (08/29)
⇒ longkey1 (08/28)
⇒ momoch (08/27)