Archive: Make file icon associations visible


Make file icon associations visible
Hello world,

my NSIS installer registers a file extension with the installed app, and also associates an icon with the file extension via

WriteRegStr HKCR ".myapp" "" "MyApp Document"
WriteRegStr HKCR "MyApp Document" "" "MyApp Document"
WriteRegStr HKCR "MyApp Document\DefaultIcon" "" "$INSTDIR\MyApp.exe,0"
After the install, ".myapp" files are not immediately displayed with the new icon, but only after a reboot.
Also, after an uninstall (that deletes the above registry keys), the files are still displayed with the application icon until a reboot.

Is there a way to make Windows show the new icon associations immediately (possibly by triggering some sort of registry refresh from the installer/uninstaller)?

Seems like an OS issue rather.


http://nsis.sourceforge.net/Refresh_shell_icons


Works perfectly. Thanks!