From fa3e5d3bd18586d2c095c1cb80319385c0404ce3 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 4 Jun 2026 13:47:25 -0700 Subject: [PATCH] install.ps1: add ie4uinit -ClearIconCache before -show (blank-shortcut fix) A same-name "Unsloth Studio.lnk" recreated across reinstalls keeps Explorer's stale (blank) iconcache_*.db entry; -show rebuilds but does not purge, so add -ClearIconCache first (matches PR #5940). The per-.lnk SHChangeNotify remains the primary fix. WoA-path only -- no effect on other installs. Co-Authored-By: Claude Opus 4.8 --- install.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install.ps1 b/install.ps1 index a3c9a4a996..a39a68f6fa 100644 --- a/install.ps1 +++ b/install.ps1 @@ -1682,7 +1682,10 @@ shell.Run cmd, 0, False } step "shortcuts" "created Desktop + Start Menu shortcuts (launch WSL Studio + open browser)" "Green" # Force the new .lnk icons to render now instead of blank: Explorer caches per-.lnk - # icons. ie4uinit -show alone is unreliable, so also broadcast SHChangeNotify below. + # icons in iconcache_*.db, and a same-name .lnk recreated across reinstalls keeps the + # stale (blank) entry. -ClearIconCache purges that db, -show rebuilds; both are still + # unreliable alone, so the per-.lnk SHChangeNotify below is the real fix. + try { & "$env:SystemRoot\System32\ie4uinit.exe" -ClearIconCache 2>$null } catch {} try { & "$env:SystemRoot\System32\ie4uinit.exe" -show 2>$null } catch {} try { if (-not ("UnslothShell.Notify" -as [type])) {