Reputation: 3
I wrote a small program to check if my network is down it looks like this:
@echo off
set ipaddr=172.217.11.238
set oldstate=neither
:loop
set state=up
ping -n 1 !ipaddr! >nul: 2>nul:
if not !errorlevel!==0 set state=down
if not !state!==!oldstate! (
echo.Link is !state!
set oldstate=!state!
start msg * "Network is !state!!"
)
ping -n 2 127.0.0.1 >nul: 2>nul:
goto :loop
endlocal
I put it in my startup folder C:\Users\Quadsam\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
after converting it to an exe and restarted my pc. The program works great but every once and a while it will pop up saying Network is Down!
so i click ok but then it says Network is Up!
and at seemingly random times it will pop up with those messages. So I got annoyed and went to delete it but it was gone! I have checked task manager and the program does not appear there. I have tried to install third party task managers but to no avail. I checked in the registry to see if there was any pointer to it in Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
. I have checked msconfig.exe and cant find it anywhere. Can anybody help me with this?
Upvotes: -1
Views: 263