Last active
September 12, 2023 11:39
Revisions
-
brainplot revised this gist
Aug 17, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ echo This script is going to restart your computer. echo Make sure to close all open applications in order not to lose any unsaved work. choice /m "Do you want to continue" if %errorlevel% NEQ "1" goto End :: Stop and disable "Windows Font Cache Service" service :FontCache -
brainplot created this gist
Aug 17, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ :: This script should be run in a priviledged command prompt @echo off echo This script is going to restart your computer. echo Make sure to close all open applications in order not to lose any unsaved work. choice /m "Do you want to continue" if %ERRORLEVEL% NEQ "1" GOTO End :: Stop and disable "Windows Font Cache Service" service :FontCache sc stop "FontCache" sc config "FontCache" start=disabled sc query FontCache | findstr /I /C:"STOPPED" if not %errorlevel%==0 (goto FontCache) :: Grant access rights to current user for "%WinDir%\ServiceProfiles\LocalService" folder and contents icacls "%WinDir%\ServiceProfiles\LocalService" /grant "%UserName%":F /C /T /Q :: Delete font cache del /A /F /Q "%WinDir%\ServiceProfiles\LocalService\AppData\Local\FontCache\*FontCache*" del /A /F /Q "%WinDir%\System32\FNTCACHE.DAT" :: Enable and start "Windows Font Cache Service" service sc config "FontCache" start=auto sc start "FontCache" :End