-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclear_icon_cache.bat
More file actions
37 lines (31 loc) · 1 KB
/
clear_icon_cache.bat
File metadata and controls
37 lines (31 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@echo off
echo This script will clear the Windows icon cache to force refresh of application icons.
echo Administrative privileges are required.
echo.
REM Check for admin privileges
net session >nul 2>&1
if %errorLevel% neq 0 (
echo This script requires administrative privileges.
echo Please right-click and select "Run as administrator".
pause
exit /b 1
)
echo Stopping Windows Explorer...
taskkill /f /im explorer.exe
echo Clearing icon cache...
REM Delete icon cache files
del /f /s /q %localappdata%\IconCache.db
del /f /s /q %localappdata%\Microsoft\Windows\Explorer\iconcache*
REM Clear the thumbnail cache
del /f /s /q %localappdata%\Microsoft\Windows\Explorer\thumbcache*
echo Restarting Windows Explorer...
start explorer.exe
echo.
echo Icon cache cleared successfully!
echo.
echo If your application still shows the old icon:
echo 1. Right-click the application shortcut and select Properties
echo 2. Click "Change Icon..." and browse to assets\r1_icon.ico
echo 3. Click OK and Apply
echo.
pause