Page 1 of 1

Refresh explorer after associating with icon

Posted: Sat Jul 07, 2007 10:17 am
by Inf0Byt3
I know this is a lousy trick hehe but it has been asked before. After you use AssociateFile(ex) from the registry lib, you need to restart the pc in order to the files to carry the associated icon. I just found how to do that without restarting.

Code: Select all

#SHCNE_ASSOCCHANGED = $08000000
#SHCNF_IDLIST = $0

SHChangeNotify_(#SHCNE_ASSOCCHANGED, #SHCNF_IDLIST, 0, 0)
This will refresh your associations instantly.

Thanks for viewing :).