Incorrect icons in Windows 7

Just this afternoon all my icons in Windows started to display incorrectly.  So I would click on the Visual Studio icon and Notepad++ would start up.  It turns out this is very easy to fix.  SImply create a batch file and copy the following into it

taskkill /F /IM explorer.exe
cd /d %userprofile%AppDataLocal
attrib –h IconCache.db
del IconCache.db
start explorer

Run this and all your icons should start working again.