VMware6辅助启动.bat
一个在需要使用VMware6时打开所有功能,不需要时关闭所有功能(包括其进程)的批处理,帮助穷苦人民节省系统资源。注意:使用时请先将此脚本置于VMware.exe所在的目录;停止会终止VMware.exe进程,请先保存好数据。
20080320更新:添加“启用、禁用网卡”功能以及一些细节上的调整。
@echo
off
color 17
titleVMware6辅助启动 . bat
rem Author:t0nsha<tunhsiaATgmail.com>,@20080320
mode concols = 66 lines = 8
:menu
cls & set op = ""
set / pop = 输入1回车启动VM,2停止,q退出此脚本(注意:使用时请先将此脚本置于VMware . exe所在的目录;停止会终止VMware . exe进程,请先保存好数据):
if %op% == 1 (
goto start
) else if %op% == 2 (
goto stop
) else if " %op% " == " q " (
exit
) else (
goto menu
)
:start
set starttype = auto
set startnow = Start
set startVMnetAdapter = Enable
goto Exec
:stop
set starttype = demand
set startnow = Stop
set startVMnetAdapter = Disable
goto Exec
:Exec
rem ConfigingServices.
echo ( 1 / 3 ) %startnow%ingservices ...
( rem ORG:手动
scconfigufad-ws60 start = demand
net stop " VMwareAgentService "
rem ORG:自动
scconfigVMAuthdService start = %starttype%
net %startnow% " VMwareAuthorizationService "
rem ORG:自动
scconfigVMnetDHCP start = %starttype%
net %startnow% " VMwareDHCPService "
rem ORG:自动
scconfig " VMwareNATService " start = %starttype%
net %startnow% " VMwareNATService "
rem ORG:自动
scconfig " vmount2 " start = %starttype%
net %startnow% " VMwareVirtualMountManagerExtended "
) > nul 2 > nul
rem ConfigingVMnetAdapters.
echo ( 2 / 3 ) %startVMnetAdapter%ingVMnetAdapters ...
devcon%startVMnetAdapter%*VMnetAdapter* > nul 2 > nul
if " %startnow% " == " Start " ( rem "Start"区分大小写!!!
echo ^ ( 3 / 3 ^ ) StartingProcesses ...
rem vmware-tray.exe会自动启动
start hqtray . exe& start vmware . exe
) else (
echo ^ ( 3 / 3 ^ ) KillingProcesses ...
TASKKILL / F / IMhqtray . exe > nul 2 > nul
TASKKILL / F / FI " IMAGENAMEeqvm* " > nul 2 > nul
)
echo : ) DONEANDQUIT!&ping 127.1 > nul
color 17
titleVMware6辅助启动 . bat
rem Author:t0nsha<tunhsiaATgmail.com>,@20080320
mode concols = 66 lines = 8
:menu
cls & set op = ""
set / pop = 输入1回车启动VM,2停止,q退出此脚本(注意:使用时请先将此脚本置于VMware . exe所在的目录;停止会终止VMware . exe进程,请先保存好数据):
if %op% == 1 (
goto start
) else if %op% == 2 (
goto stop
) else if " %op% " == " q " (
exit
) else (
goto menu
)
:start
set starttype = auto
set startnow = Start
set startVMnetAdapter = Enable
goto Exec
:stop
set starttype = demand
set startnow = Stop
set startVMnetAdapter = Disable
goto Exec
:Exec
rem ConfigingServices.
echo ( 1 / 3 ) %startnow%ingservices ...
( rem ORG:手动
scconfigufad-ws60 start = demand
net stop " VMwareAgentService "
rem ORG:自动
scconfigVMAuthdService start = %starttype%
net %startnow% " VMwareAuthorizationService "
rem ORG:自动
scconfigVMnetDHCP start = %starttype%
net %startnow% " VMwareDHCPService "
rem ORG:自动
scconfig " VMwareNATService " start = %starttype%
net %startnow% " VMwareNATService "
rem ORG:自动
scconfig " vmount2 " start = %starttype%
net %startnow% " VMwareVirtualMountManagerExtended "
) > nul 2 > nul
rem ConfigingVMnetAdapters.
echo ( 2 / 3 ) %startVMnetAdapter%ingVMnetAdapters ...
devcon%startVMnetAdapter%*VMnetAdapter* > nul 2 > nul
if " %startnow% " == " Start " ( rem "Start"区分大小写!!!
echo ^ ( 3 / 3 ^ ) StartingProcesses ...
rem vmware-tray.exe会自动启动
start hqtray . exe& start vmware . exe
) else (
echo ^ ( 3 / 3 ^ ) KillingProcesses ...
TASKKILL / F / IMhqtray . exe > nul 2 > nul
TASKKILL / F / FI " IMAGENAMEeqvm* " > nul 2 > nul
)
echo : ) DONEANDQUIT!&ping 127.1 > nul