用批处理来启动和停止服务可以为我们带来很多的便利,当计算机启动过多的不需要服务,大大的影响计算机的性能,所以为了更好的管理和使用各类服务,
通常用一个或多个批处理文件启动和停止服务。
常用的: VMware Oracle MySql等 。。。
net start "VMware Authorization Service"
net start "VMware DHCP Service"net start "VMware Host Agent"
net start "VMware NAT Service"
net start "VMware Server Web Access"
net stop "VMware Host Agent"
net stop "VMware DHCP Service"
net stop "VMware NAT Service"
net stop "VMware Authorization Service"
net stop "VMware Server Web Access"
需要注意的是,服务名称需要加上引号。。。
有些服务需要依赖于其他服务的状态时,可以在批处理中暂停几秒来执行:
ping /n 5 127.1 >nul
如:
net stop "VMware Host Agent"
ping /n 5 127.1 >nul
net stop "VMware DHCP Service"
net stop "VMware NAT Service"
net stop "VMware Authorization Service"
net stop "VMware Server Web Access"
1万+

被折叠的 条评论
为什么被折叠?



