CODE: [Copy to clipboard]@echo off sc query TermService | findstr /i RUNNING>nul if %errorlevel% equ 0 ( echo 显示启动的语句 ) else ( echo 提示保存重启 )