EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Custom icons for virtual disks

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
Posted: 11/17/2009 10:54:09
by Eugene Mayevski (EldoS Corp.)

Let the application set the icon for the disk, which will be displayed in Explorer.

Sincerely yours
Eugene Mayevski
Posted: 11/26/2009 09:45:08
by Seung-joo Cha (Standard support level)
Joined: 02/03/2009
Posts: 4

it works with registry.
but CBFS has a bug with XP
when you guys fix it?

see :

my sample :
internal static void SetDriveIcon(string driveLetter, string iconPath)

RegistryKey hklm = Registry.LocalMachine;
hklm = hklm.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\" + driveLetter.Substring(0, 1) + @"\DefaultIcon");
hklm.SetValue(null, iconPath, RegistryValueKind.String);
Posted: 11/26/2009 10:25:23
by Eugene Mayevski (EldoS Corp.)

Yes, it's possible to do this via registry, but proper implementation would require this setting to appear in registry when the mounting point is created and be removed when the mounting point disappears for whatever reason. This requires support from the helper DLL (the one we have for tracking mounting points now).

Also I don't understand your "has a bug with XP" statement. Please explain what you were talking about.

Sincerely yours
Eugene Mayevski
Posted: 11/26/2009 11:08:58
by Bastian Moldenhauer (Standard support level)
Joined: 06/04/2009
Posts: 40


we implemented it this way and it works fine under WinXp/Vista 32/64bit. The bug was from back in 2008 and is obsolete i think.
One Problem with this solution is that you need Adminrights to set this registry value. We worked around this by implementing a winservice which runs priviliged and sets this registry value.

Posted: 11/27/2009 05:03:42
by Eugene Mayevski (EldoS Corp.)

Our developer says that in CBFS 3.0 we will use different mechanism for icon setting, which won't be limited by requiring certain admin rights.

Sincerely yours
Eugene Mayevski
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.



Topic viewed 1987 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!