0

I am having one application "Lifeline.exe" which is installed on server. To execute this application on client machine I need to create shortcut from server.

Some times one of the switch in the network goes down and user can't access server.

I want to create one batch file which ping to local ip address i.e localhost , if ping status=false then it will execute "Network Error, please contact Administrator".

1 Answers1

1

You could ping the server and see if it replied.

@echo off
ping 192.168.0.1 | find "Reply" >nul
if not %errorlevel%==0 echo Network Error, please contact Administrator
pause >nul
Bali C
  • 30,582
  • 35
  • 123
  • 152