or download this
echo Stopping ArchMaint >> %LOG_FILE%
NET STOP ArchMaint >> %LOG_FILE% 2>&1
...
echo Return code = %SAVE_ERRORLEVEL% >> %LOG_FILE%
if not "%SAVE_ERRORLEVEL%"=="0" call :SEND_EMAIL ArchMaint start f
+ailed
echo Finished restarting ArchMaint >> %LOG_FILE%