首次使用bat控制服务启动和关闭,专门记录一下。
echo 开始启动VMware服务
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"
echo.
echo 程序启动后,请勿关闭本窗口,否则无法关闭服务项
echo.
rem ***根据安装目录启动程序***
d:
rem ***进入安装目录***
cd D:\develop\VMware
rem ***执行运行文件***
D:\develop\VMware\vmware.exe
rem ***程序关闭时执行***
echo 开始关闭VMware服务
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"
可以把启动和关闭分成两个文件,手动控制。