28,659 questions
@ECHO OFF
for /F "tokens=3 delims=: " %%H in ('sc query "GS Automation Service" ^| findstr " STATE"') do (
if /I "%%H" EQU "RUNNING" (
echo Stop GS Automation Service......
sc.exe stop "GS Automation Service"
)
)
echo Delete GS Automation Service......
echo ---------------------------------------------------
sc.exe delete "GS Automation Service"
echo ---------------------------------------------------