关闭VMware开机自启动服务
关闭VMware开机自启动服务,在需要用到的时候再打开
操作方法
- 01
关闭VM的自启动服务 1.运行-services.msc 2.找到VMware开头的(一般为5个)-双击打开-修改启动类型为手动
- 02
编辑Windows批处理文件 1.新建一个文本文档-把扩展名改成.bat 2.拷贝以下代码并保存 @echo off for /f "skip=3 tokens=4" %%i in ('sc query "VMAuthdService"') do set "zt=%%i" &goto :next :next if /i "%zt%"=="RUNNING" ( echo 服务VMware Authorization Service正在运行 ) else ( echo 服务VMware Authorization Service已停止 ) for /f "skip=3 tokens=4" %%i in ('sc query "VMnetDHCP"') do set "zt=%%i" &goto :next :next if /i "%zt%"=="RUNNING" ( echo 服务VMware DHCP Service正在运行 ) else ( echo 服务VMware DHCP Service已停止 ) for /f "skip=3 tokens=4" %%i in ('sc query "VMware NAT Service"') do set "zt=%%i" &goto :next :next if /i "%zt%"=="RUNNING" ( echo 服务VMware NAT Service正在运行 ) else ( echo 服务VMware NAT Service已停止 ) for /f "skip=3 tokens=4" %%i in ('sc query "VMUSBArbService"') do set "zt=%%i" &goto :next :next if /i "%zt%"=="RUNNING" ( echo 服务VMware USB Arbitration Service正在运行 ) else ( echo 服务VMware USB Arbitration Service已停止 ) for /f "skip=3 tokens=4" %%i in ('sc query "VMwareHostd"') do set "zt=%%i" &goto :next :next if /i "%zt%"=="RUNNING" ( echo 服务VMware Workstation Server正在运行 ) else ( echo 服务VMware Workstation Server已停止 ) choice /c:12 /m "启动/停止VM虚拟机服务及网络连接[1启动,2停止]" if errorlevel 2 goto two if errorlevel 1 goto one :one echo 正在启用服务... net start "VMnetDHCP" net start "VMware NAT Service" net start "VMUSBArbService" net start "VMAuthdService" net start "VMwareHostd" echo 正在启用网络连接... netsh interface set interface "VMware Network Adapter VMnet1" enable netsh interface set interface "VMware Network Adapter VMnet8" enable echo 网络连接VMware Network Adapter VMnet1、VMware Network Adapter VMnet8启动成功 choice /c:12 /m " 是否启动VMware Workstations...[1是,2否]" if errorlevel 2 exit if errorlevel 1 start "" "D:\VMware\vmware.exe" >nul :two echo 正在禁用服务服务... net stop "VMwareHostd" net stop "VMnetDHCP" net stop "VMware NAT Service" net stop "VMUSBArbService" net stop "VMAuthdService" echo 正在禁用网络连接... netsh interface set interface "VMware Network Adapter VMnet1" disable netsh interface set interface "VMware Network Adapter VMnet8" disable echo 网络连接VMware Network Adapter VMnet1、VMware Network Adapter VMnet8禁用成功 echo 按任意键退出... pause>nul exit
- 03
运行批处理文件 右键-以管理员身份运行-按提示选择功能
- 04
关闭图标 打开VMware Workstations-编辑-首选项-工作区-显示托盘图标-修改为从不
- 05
完成 下次需要用VMware的时候,以管理员身份运行批处理文件,按提示启动服务并运行程序即可。