Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REM THIS IS TO BE USED IN A .CMD FILE
- @echo off
- call
- REM Verbose
- echo === Clear Explorer Cache (potential crash fix) ===
- echo:
- echo This script will restart your PC. Please ensure that your work is saved before continuing.
- pause
- REM Check Admin permissions
- echo:
- echo This script requires admin permissions. Checking current permissions...
- net session >nul 2>&1
- if %errorlevel% equ 0 (
- echo Success!
- echo:
- ) else (
- echo Error! Please run this script as Administrator.
- pause
- exit /b 2
- )
- REM The fix is to delete all files in %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations
- echo Applying fix...
- del /S /Q %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations >nul 2>&1
- if %errorlevel% equ 0 (
- echo Fix applied!
- echo:
- ) else (
- echo Error! Please try again.
- pause
- exit /b 1
- )
- REM After applying the fix, the computer must be restarted
- echo Your computer will restart in 10 seconds.
- shutdown /r /T 10
- if %errorlevel% equ 0 (
- echo Restart command sent. Thanks for using this script
- pause
- exit /b 0
- ) else (
- echo Error while trying to restart your PC. Please restart manually.
- pause
- exit /b 1
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement