本文共 1775 字,大约阅读时间需要 5 分钟。
VMware6辅助启动.bat
一个在需要使用VMware6时打开所有功能,不需要时关闭所有功能(包括其进程)的批处理,帮助穷苦人民节省系统资源。注意:使用时请先将此脚本置于VMware.exe所在的目录;停止会终止VMware.exe进程,请先保存好数据。
20080320更新:添加“启用、禁用网卡”功能以及一些细节上的调整。
@echo off color 17 title VMware6辅助启动 . bat rem Author: t0nsha <tunhsiaATgmail.com>, @20080320 mode con cols = 66 lines = 8 :menu cls & set op = "" set / p op = 输入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 Configing Services. echo ( 1 / 3 ) %startnow%ing services ... ( rem ORG:手动 sc config ufad-ws60 start = demand net stop " VMware Agent Service " rem ORG:自动 sc config VMAuthdService start = %starttype% net %startnow% " VMware Authorization Service " rem ORG:自动 sc config VMnetDHCP start = %starttype% net %startnow% " VMware DHCP Service " rem ORG:自动 sc config " VMware NAT Service " start = %starttype% net %startnow% " VMware NAT Service " rem ORG:自动 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" 区分大小写!!! echo ^ ( 3 / 3 ^ ) Starting Processes ... rem vmware-tray.exe 会自动启动 start hqtray . exe & start vmware . exe ) else ( echo ^ ( 3 / 3 ^ ) Killing Processes ... TASKKILL / F / IM hqtray . exe > nul 2 > nulTASKKILL / F / FI " IMAGENAME eq vm* " > nul 2 > nul ) echo : ) DONE AND QUIT! & ping 127.1 > nul 转载地址:http://fgvai.baihongyu.com/