Last active
July 2, 2019 17:43
-
-
Save AnthonyVadala/35158b03d10a5d290bf210836705c344 to your computer and use it in GitHub Desktop.
A simple batch script to fix most simple Windows issues (Run as Administrator)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::Hacker Colors | |
color 0a | |
::Checks if script is minimized and relaunches if not | |
if not "%minimized%"=="" goto :minimized | |
set minimized=true | |
start /min cmd /C "%~dpnx0" %* | |
goto :EOF | |
:minimized | |
Title Running Windows Auto-Repair Script - DO NOT CLOSE | |
::Lists File System | |
echo Listing File System... | |
timeout 5 | |
tree | |
::Display System Information | |
echo Displaying System Information... | |
timeout 5 | |
Systeminfo | |
::Resets networking settings | |
echo Resetting Networking Settings... | |
timeout 5 | |
ipconfig /all | |
ipconfig /release | |
ipconfig /flushdns | |
netsh winsock reset | |
::Deletes Windows Temp Files | |
echo Clearing Temp Files... | |
timeout 5 | |
del C:\Temp /S /Q /F | |
del C:\Temp /S /Q /A:H | |
FOR /D %%p IN ("C:\Temp\*") DO rmdir "%%p" /s /q | |
del C:\Windows\Temp /S /Q /F | |
del C:\Windows\Temp /S /Q /A:H | |
FOR /D %%p IN ("C:\Windows\Temp\*") DO rmdir "%%p" /s /q | |
::Stops, Clears and Restarts the Print Spooler | |
Echo Resetting Print Spooler... | |
timeout 5 | |
net stop spooler | |
DEL /F /S /Q %systemroot%\System32\spool\PRINTERS\* | |
net start spooler | |
::Force Restarts Windows | |
echo Auto-Repair Script Complete! | |
echo Rebooting Windows... | |
shutdown.exe /r /t 00 /f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment