Vmware6 auxiliary startup. bat

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.