@echo off IF %1 == restart ( net stop RCSWorker /y net start RCSWorker /y ) ELSE ( net %1 RCSWorker /y ) .