1

I created my own executable with an icon file embedded into it and I put a shortcut to the program in the start menu folder C:\Users\Username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Shortcuts. The program shows up in the search results when I search for it by the shortcut's filename, and it displays the icon I embedded into the .exe file. By search I mean pressing the Windows key and beginning to type the program name.

However, if I recompile the program and embed a different icon into it, although the new icon is used for the program when I view it in file explorer and on the start menu, it is NOT updated in the Windows search results; it still uses the old icon. Changing the shortcut filename doesn't fix it. I have to create a new .exe file with a different name and the new icon file for the search menu to display the new icon rather than the old.

The problem is I don't want to change the executable's filename. I'm sure there's some cache I need to refresh, but I don't know what the search menu relies on to pull the icons. Any ideas?

I'm on Windows 10 1607 (14393).

1
  • Open C:\Users\<your username>\AppData\Local\Microsoft\Windows\Explorer and Delete files starting with iconcache. All files might not get deleted, because some files would still be in use by explorer, but it still might be enough to solve the issue with the start menu. If this doesn't help, try deleting files (from cmd) after you terminate explorer. Commented Jun 16, 2022 at 6:53

1 Answer 1

0

From the official Microsoft forums:

Open a commandline and execute this command:

del /f /q "%localappdata%\Packages\Microsoft.Windows.Search_cw5n1h2txyewy\LocalState\AppIconCache\100\*"

Then sign out and in again, the icon cache should rebuild itself automatically. Tested and it works for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .