Id like to share a script Ive made/ assembled as a thank you for being able to view and use this forum and 7 forum previously.
Im not entirely shore how to post it but here goes-LoL.
copy the .txt below and change to to .bat extension on you desktop or root.(script is below *****)
Title PC CLEANER 1
echo = This program will help you clean your PC on C:Drive =
echo = To escape at any time press ctrl+c then y for yes =
echo 1. Uninstall Programs.(windows unistaller)
echo 2. Clean up unnecessary files to create more drive Space.(Windows Clean manager)
echo 3. Tools(Remove StartUp Programs),(Msconfig),(boot),(Tools),(System configuration),(defrag),(Trim),(computer management).etc
echo 4. Scan for viruses and errors.(System file checker)
echo 5. Check for and repair bad sectors on Disk. (Checkdisk)
echo 6. Repair network connections(Release/Renew DHCP leases,Flush ARP cache,Purge NBT cache)This may need to be run twice if it fails.
echo 7. Reset ip and flush DNS, you may need to reset connection to router from pc after using this.
echo 8. Just test my Internet.
echo Press One of the numbers above and then hit enter.
echo Items 4-7, need to be run as "ADMIN"
echo note// Check disk or Scandisk will not start unless you, "Run file as administrator".
set /p "cho=>"
if %cho%==1 goto 1A
if %cho%==2 goto 2A
if %cho%==3 goto 3A
if %cho%==4 goto 4A
if %cho%==5 goto 5A
if %cho%==6 goto 6A
if %cho%==7 goto 7A
if %cho%==8 goto 8A
chkdsk C: /F/I/C/R
echo %time%: Beginning network repair process.
:: BEGIN Callout A
REM echo %time%: Releasing DHCP lease(s)...
REM ipconfig /release > NUL
:: END Callout A
echo %time%: Renewing DHCP lease(s)...
ipconfig /renew > NUL
echo %time%: Flushing ARP cache...
arp -d * > NUL
:: BEGIN Callout B
echo %time%: Purging NBT remote cache table....
nbtstat -R | find /i "failed" 1>&2
echo %time%: Releasing and refreshing registered NBT names...
nbtstat -RR | find /i "failed" 1>&2
:: END Callout B
echo %time%: Flushing DNS cache...
ipconfig /flushdns > NUL
echo %time%: Registering with DNS...
ipconfig /registerdns > NUL
echo %time%: Network repair process done.
echo This will reset IP and flush DNS
netsh int ip reset C:\resetlog.txt
netsh winsock reset
Rem: Easy way for anyone to see if a computer is on the network/internet and even do some basic troubleshooting.
Rem:It assumes that you are on a LAN, with a router at ip of 192.168.1.1 If not then extract the info from an ipconfig and change it , like it is, it will work and should be good to go normally.
Rem: Here is the basic rundown on what it does
ECHO Checking connection, please wait...
PING -n 1 www.google.com|find "Reply from " >NUL
IF NOT ERRORLEVEL 1 goto :SUCCESS
IF ERRORLEVEL 1 goto :TRYAGAIN
ECHO Let me try a bit more, please wait...
PING -n 3 www.google.com|find "Reply from " >NUL
IF NOT ERRORLEVEL 1 goto :SUCCESS2
IF ERRORLEVEL 1 goto :TRYIP
ECHO Checking DNS...
ECHO Lets try by IP address...
ping -n 1 18.104.22.168|find "Reply from " >NUL
IF NOT ERRORLEVEL 1 goto :SUCCESSDNS
IF ERRORLEVEL 1 goto :TRYROUTER
ECHO Lets try pinging the router....
ping -n 2 192.168.1.1|find "Reply from " >NUL
IF NOT ERRORLEVEL 1 goto :ROUTERSUCCESS
IF ERRORLEVEL 1 goto :NETDOWN
ECHO It appears that you can reach the router, but internet is unreachable.
ECHO It appears that you having network issues, the router cannot be reached.
ECHO It appears that you are having DNS issues.
ECHO You have an active Internet connection
ECHO You have an active internet connection but some packet loss was detected.
ECHO You do not have an active Internet connection
- Trys to ping Google with 1 packet, if it succeeds it ends with a success message.
- If it fails, it will try 3 more packets, if that succeeds, it will finish but warn it detected packet loss.
- If it still fails, it will try by IP address to test DNS, if this succeeds it will tell you that it had DNS issues.
- If it still fails it will try to ping 192.168.1.1 and if it succeeds will tell you it can reach the router but not internet.
- If the ping to 192.168.1.1 fails, it will tell you the network is down.
P.S use at your own risk no warranty expreesed or implied.