Vmwa虚拟机安装后会在系统中加入五个服务项并默认开机自启
还会添加两个网络适配器并默认打开
强迫症果断不能忍!!!
所以写两个批处理文件来开启和关闭这些服务与网卡
echo off
echo "开始启动网卡和服务"
netsh interface set interface VMnet1 enabled
netsh interface set interface VMnet8 enabled
net start "VMware Authorization Service"
net start "VMware DHCP Service"
net start "VMware NAT Service"
net start "VMware USB Arbitration Service"
net start "VMware Workstation Server"
exit
echo off
echo "开始关闭启动网卡和服务"
netsh interface set interface VMnet8 disabled
netsh interface set interface VMnet1 disabled
net stop "VMware NAT Service"
net stop "VMware DHCP Service"
net stop "VMware Workstation Server"
net stop "VMware Authorization Service"
net stop "VMware USB Arbitration Service"
exit
将两个代码片分别写在txt文件中并重命名为 启动.bat 和 关闭.bat
让后将虚拟机创建的网络适配器分别重命名为:VMnet1和VMnet8 并禁用
ok
以后每次使用虚拟机前以管理员权限运行启动.bat
以后每次关闭虚拟机后以管理员权限运行关闭.bat
相当清爽~~