Update IconCache.db programmatically

I have a button for firefox.exe. I changed the attached icon through the registry, I set the path to the url:

  • I added a folder firefox.exeto HKEY_LOCAL_MACHINE: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\and set the valueC:\Users\myUsername\Downloads\addon.ico
  • I added the folder firefox.exeto HKEY_CURRENT_USER: HKEY_CURRENT_USER\SOFTWARE\Classes\Applications\and set the valueC:\Users\myUsername\Downloads\addon.ico

The icon along this path definitely exists.

However, although my icon is assigned to her, she does not take. I assume I need to update IconCache.db, can you recommend a way to do this using win api? Without restarting the computer or program or exiting the computer, please, I hope.

+1
source share
1 answer

:

SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nil, nil)

:

SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH, 'YourPinnedFileName', nil)
+4

Source: https://habr.com/ru/post/1624347/


All Articles