此代码适合有一定windows操作系统基础的人使用

@echo off
for %%i in ( mysql OracleDBConsoleleak OracleMTSRecoveryService OracleOraDb11g_home1TNSListener OracleServiceLEAK MSSQLSERVER MSSQLServerOLAPService MsDtsServer100 ReportServer SQLWriter) do (
echo the service '%%i' is being stopping...
net stop %%i
echo service '%%i' stopped.
)
pause

实际效果如下:

windows批量停止服务_oracle