Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ECHO off
- title AutoPingScript Copyright by MrDjSoft 2014
- ::###########################################
- :: Variablen
- ::###########################################
- set NickName=MrDj
- set AutoPingIP=109.230.255.203
- set TestIP=www.YouTube.com
- set TestIP2=www.amazon.com
- set TestIP3=www.google.com
- set PingAnzahl=1
- set PausenZeit=10
- set Datei=C:\Users\%USERNAME%\AppData\Roaming\.MrDjSoft\AutoPing\%AutoPingIP%\ServerDowntime.txt
- set Meldung=C:\Users\%USERNAME%\AppData\Roaming\.MrDjSoft\AutoPing\Server_Down.exe
- set Meldung1=KeinInternet.cmd
- ::################################################################
- :: DO NOTHING UNDER THIS LINE
- :: UNLESS YOU KNOW WHAT YOU ARE DOING!!!!
- ::################################################################
- :start
- if exist C:\Users\%USERNAME%\AppData\Roaming\.MrDjSoft goto MrDjSoftCheck
- md C:\Users\%USERNAME%\AppData\Roaming\.MrDjSoft
- ECHO Hallo hier landen Unterschiedlichste Dateien meiner Scripte! >C:\Users\%USERNAME%\AppData\Roaming\.MrDjSoft\README.txt
- :MrDjSoftCheck
- if exist C:\Users\%USERNAME%\AppData\Roaming\.MrDjSoft\AutoPing goto PfadCheck
- md C:\Users\%USERNAME%\AppData\Roaming\.MrDjSoft\AutoPing
- md C:\Users\%USERNAME%\AppData\Roaming\.MrDjSoft\AutoPing\%AutoPingIP%
- :PfadCheck
- if exist %Meldung% goto MeldungCheck
- bitsadmin.exe /transfer "MeldungsDL" http://109.230.255.203/Scripts/AutoPing/Meldung/Server_Down.exe %Meldung%
- :MeldungCheck
- ::if exist %Meldung% goto klar
- ::ECHO @ECHO off > %Meldung%
- ::ECHO title Server ist Offline!!!! Copyright by MrDjSoft 2014 >> %Meldung%
- ::ECHO mode con: cols=75 lines=5 >> %Meldung%
- ::ECHO color bc >> %Meldung%
- ::ECHO echo Der Server ist nicht mehr erreichbar!! >> %Meldung%
- ::ECHO cls >> %Meldung%
- ::ECHO @echo >> %Meldung%
- ::ECHO cls >> %Meldung%
- ::ECHO timeout /t 1 /nobreak >NUL >> %Meldung%
- ::ECHO cls >> %Meldung%
- ::ECHO @echo >> %Meldung%
- ::ECHO cls >> %Meldung%
- ::ECHO timeout /t 1 /nobreak >NUL >> %Meldung%
- ::ECHO cls >> %Meldung%
- ::ECHO @echo >> %Meldung%
- ::ECHO cls >> %Meldung%
- ::ECHO timeout /t 1 /nobreak >NUL >> %Meldung%
- ::ECHO cls >> %Meldung%
- ::ECHO @echo >> %Meldung%
- ::ECHO cls >> %Meldung%
- ::ECHO timeout /t 1 /nobreak >NUL >> %Meldung%
- ::ECHO cls >> %Meldung%
- ::ECHO @echo >> %Meldung%
- ::ECHO cls >> %Meldung%
- ::ECHO echo Bitte Warten >> %Meldung%
- ::ECHO timeout /t 10 /nobreak ">NUL" >> %Meldung%
- ::ECHO exit >> %Meldung%
- :klar
- set ZeitStempel=%DATE% %TIME:~0,5%
- ping %AutoPingIP% -n %PingAnzahl%
- if errorlevel 1 goto Test1
- if errorlevel 0 goto Erfolgreich
- :Test1
- cls
- ECHO InternetVerbindung wird getestet!
- ECHO [%USERNAME%] Verbindung zu %TestIP% wird getestet! [%ZeitStempel%] >> ServerDowntime.txt
- ping %TestIP% -n %PingAnzahl%
- if errorlevel 1 goto Test2
- if errorlevel 0 goto ServerAus
- :Test2
- cls
- ECHO InternetVerbindung wird getestet!
- ECHO [%USERNAME%] Verbindung zu %TestIP2% wird getestet! [%ZeitStempel%] >> ServerDowntime.txt
- ping %TestIP2% -n %PingAnzahl%
- if errorlevel 1 goto Test3
- if errorlevel 0 goto ServerAus
- :Test3
- cls
- ECHO InternetVerbindung wird getestet!
- ECHO [%USERNAME%] Verbindung zu %TestIP3% wird getestet! [%ZeitStempel%] >> ServerDowntime.txt
- ping %TestIP3% -n %PingAnzahl%
- if errorlevel 1 goto KeinInternet
- if errorlevel 0 goto ServerAus
- :Erfolgreich
- timeout /t %PausenZeit% /nobreak >NUL
- cls
- goto start
- :ServerAus
- start %Meldung%
- ECHO
- goto start
- :KeinInternet
- goto Test1
Advertisement
Add Comment
Please, Sign In to add comment