This section of my script doesn't seem to be working correctly. It will continue on to the "start" section if the network is present or not. Any advice?

code:
shell '%comspec% /c ping -w 5000 -n 1 hrbackup | find /i "ttl"'
if @ERROR=0
goto start
else
goto end
endif

_________________________
I could have made a neat retort but didn't, for I was flurried and didn't think of it till I was downstairs.
-Mark Twain