I wish to run a script at logon each day to test if a PC on the local network is online or not. A message should only be displayed if the PC is offline.
For test purposes using a batch file the closest I have got is this -
@echo off
ping -n 1 192.168.0.6 >nul &&(
START CMD /C "ECHO online && PAUSE"
)||(
START CMD /C "ECHO offline && PAUSE"
)
which opens a window relative to the 'online' message but if I change the IP address to an incorrect one I still get the same message box.
In case it is important both PC's are running windows 10
Thanks