5 Replies Latest reply on Aug 5, 2014 3:28 PM by Bill Robinson

    Correct Syntax Needed

    Jegavelan Sargunan



         Please correct my syntax , i want to achieve the following


      This works good in Windows

      sc query "ServiceName" | find "RUNNING" if errorlevel 1 sc start "ServiceName"


      This is not working in NSH

      nexec -e  sc query ServiceName | findstr RUNNING & if errorlevel 1 sc start ServiceName"