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