From: gordontcp on
Hi all,
I would like to change label to a drive letter.
I find a guide in msdn: 'http://msdn.microsoft.com/en-us/library/
aa969356.aspx'

The following example specifies label for the E: drive.
For Windows 2000:
?HKEY_CLASSES_ROOT\Applications\Explorer.exe\Drives\E\DefaultLabel\
(Default)
= MyDrive
....
Finally, call SHChangeNotify to notify the Shell to update its
cache.

I modify the registry as above guide, it works for changing the label
of the
drive letter. However, it can't update immediately.
I have to open another 'Explorer', then the new label will be updated.
I have tried following codes, but it doesn't work:
SHChangeNotify(SHCNE_ALLEVENTS, SHCNF_FLUSH, NULL,NULL);
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST + SHCNF_FLUSH,
NULL, NULL);

SendMessageTimeout(HWND_BROADCAST,WM_SETTINGCHANGE,NULL,NULL,SMTO_NORMAL,
1000,&dw
Result);

Does anyone know how to notify the Shell to update its cache?
Any suggestion is highly appreciated.

Thanks!
Best Regards,
Gordon