Rebuilding Icon Cache?

Conejo

Well-known member
Joined
Jul 24, 2013
Messages
65
Location
USA
Programming Experience
1-3
How do you call up a function to rebuild the icon cache in VB.Net, thanks.
 

Herman

Well-known member
Joined
Oct 18, 2011
Messages
882
Location
Montreal, QC, CA
Programming Experience
10+
Run the following commands through a shell instance:

VB.NET:
ie4uinit.exe -ClearIconCache
taskkill /IM explorer.exe /F
DEL "%localappdata%\IconCache.db" /A
shutdown /r /f /t 00

Beware that this NEEDS a reboot, so make sure you advertise it fully before issuing a forced reboot.
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,348
Location
Sydney, Australia
Programming Experience
10+
Here's the contents of a batch file that I use to rebuild the icon cache. It does not require a reboot.
VB.NET:
taskkill /im explorer.exe /f
cd appdata\local
attrib -h iconcache.db
del iconcache.db
explorer.exe
You can either execute that via a command prompt or put it in a batch file and execute that.
 
Top Bottom