Vmware6 auxiliary startup. bat
A batch process that enables all features and disables all features (including processes) when you need to use vmware6, helping the needy to save system resources. Note: When using this script, stop the vmware.exe process and save the data.
20080320 update: add the "enable/disable nic" function and make some details.
@ Echo off
Color 17
Title vmware6 auxiliary startup. bat
Rem Author: t0nsha <tunhsiaatgmail.com>, @ 20080320
Mode con Cols = 66 lines = 8
: Menu
CLS & set op = ""
Set/P op = enter 1 and press enter to start Vm, 2 to stop, and Q to exit this script (Note: when using this script, please stop the vmware.exe process before using it. Please save the data first ):
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 configing services.
Echo (1/3) % startnow % ing services...
(REM org: Manual
SC config ufad-ws60 start = demand
Net stop "VMware agent service"
Rem org: automatic
SC config vmauthdservice start = % starttype %
Net % startnow % "VMware Authorization Service"
Rem org: automatic
SC config vmnetdhcp start = % starttype %
Net % startnow % "VMware DHCP service"
Rem org: automatic
SC config "VMware NAT service" Start = % starttype %
Net % startnow % "VMware NAT service"
Rem org: automatic
SC config "vmount2" Start = % starttype %
Net % startnow % "VMware Virtual Mount manager extended"
)> NUL 2> NUL
Rem configing vmnetadapters.
Echo (2/3) % startvmnetadapter % ing vmnetadapters...
Devcon % startvmnetadapter % * vmnetadapter *> NUL 2> NUL
If "% startnow %" = "start" (REM "start" is case sensitive !!!
Echo ^ (3/3 ^) starting processes...
Rem vmware-tray.exe will automatically start
Start hqtray.exe & start vmware.exe
) Else (
Echo ^ (3/3 ^) Killing processes...
Taskkill/f/IM hqtray.exe> NUL 2> NUL
Taskkill/f/fi "imagename eq vm *"> NUL 2> NUL
)
Echo :) done and quit! & Pinging 127.1> NUL