Skip to content

Commit

Permalink
Update AutoRunWithCMD.cmd
Browse files Browse the repository at this point in the history
Attempting to debug why the :PingGoogle section just doesn't work correctly, according to the log it DOES ping google, but somewhere along the lines of it setting the %InternetState% variable, or potentially it echoing the variable, it just doesn't work.
  • Loading branch information
techflashYT committed Aug 19, 2021
1 parent 418e898 commit 27409a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions AutoRunWithCMD.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ if '%choice%'=='3' goto :DISMandSFC
if '%choice%'=='4' goto :exit
ECHO "%choice%" is not a valid option, please try again.
ECHO.
goto :Choice
echo.>EndOfChoiceTriggered.txt


Expand All @@ -107,10 +108,10 @@ goto :leave
echo.>EndOfGoToRegualarCMDTriggered.txt

:PingGoogle
@echo off
@echo on
title Pinging Google......
ping google.com -n 1 >PingStats.txt
if !errorlevel!==0 set %InternetState%=up else set %InternetState%=down
if !errorlevel!==0 set InternetState=up else set InternetState=down
echo. Internet is %InternetState%!
goto :MainMenu
echo.>EndOfPingGoogleTriggered.txt
Expand Down

0 comments on commit 27409a5

Please sign in to comment.