Just as I suspected. When I echo errorlevel I get errorlevel=0 when network cable plugged in and errorlevel=1 when unplugged.

Is there something wrong with my syntax?
_________________________
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