@echo off
setlocal EnableExtensions
title NexaOffice - Refresh Windows Icon Cache
echo ============================================
echo NexaOffice Windows Icon Cache Refresh
echo ============================================
echo.
echo This tool can help if the title bar or taskbar icon still looks old or blurry
echo after rebuilding NexaOffice.
echo.
echo It will restart Windows Explorer and delete local icon cache files.
echo Please save open work first.
echo.
choice /C YN /M "Continue"
if errorlevel 2 exit /b 0

taskkill /F /IM NexaOffice.exe >nul 2>nul
taskkill /F /IM NexaOffice_WorkSuite.exe >nul 2>nul
taskkill /F /IM explorer.exe >nul 2>nul

timeout /t 2 /nobreak >nul

del /A /F /Q "%LOCALAPPDATA%\IconCache.db" >nul 2>nul
del /A /F /Q "%LOCALAPPDATA%\Microsoft\Windows\Explorer\iconcache*" >nul 2>nul
del /A /F /Q "%LOCALAPPDATA%\Microsoft\Windows\Explorer\thumbcache*" >nul 2>nul

start explorer.exe

echo.
echo Done. If the taskbar icon is still old, unpin the old NexaOffice icon and pin the new EXE again.
pause
