Click here to Skip to main content
15,913,106 members

Comments by mozart1983 (Top 3 by date)

mozart1983 5-Jan-13 3:56am View    
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoDriveTypeAutoRun"=dword:0000005f
"NoSimpleNetIDList"=dword:00000001
"NoDrives"=dword:00000040
mozart1983 5-Jan-13 3:39am View    
First, thanks a lot!

I want to hide dirve letters on windows shell without restart shell and can access it, this is for my company project requirement.

Follow is my code:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoDrives"=dword:00000040

DWORD dwResult = -1;
LRESULT hRet = ::SendMessageTimeout( HWND_BROADCAST, WM_SETTINGCHANGE, NULL, NULL, SMTO_BLOCK, 1000, &dwResult );

SHChangeNotify( SHCNE_UPDATEITEM, SHCNF_IDLIST, NULL, NULL );
SHChangeNotify( SHCNE_DRIVEREMOVED, SHCNF_PATH, "G:", NULL );
SHChangeNotify( SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL );


The result is: dirve ico become transparent status when refresh shell. I want to hide the drive letter immediately, invisible without restart shell. By the way, it is work good on Winxp.
mozart1983 5-Jan-13 1:40am View    
Do you mean the Registry set wrong?
I think it's not, because it good on restart explorer.