|
Answer» Hi folks,
I wondering if network COULD return value to my program. If network become disconnected or no CONNECTIVITY it should return a value to my program.
Like if it is not there value for a = 0 or 1
However, I am thinking to ping the network default gateway. And it destination host unreachable or time out comes start
Shutdown.exe -s
Thanks and regards VishThis is the kind of question you could have tested from the command LINE and seen the results in action.
Code: [Select]@echo off ping 192.168.2.1 if ERRORLEVEL 1 shutdown -s
Replace the IP address with your gateway IP.
Any reason you want to shutdown the machine if you can't reach the gateway? Couldn't you simply power cycle the device?
Just asking.
|