Reputation: 313
I am registering my BHO this way:
public static string RegistryKeyLocation = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Browser Helper Objects";
[ComRegisterFunction]
public static void Register(Type type)
{
RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(RegistryKeyLocation, Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree);
if (registryKey == null)
{
registryKey = Registry.LocalMachine.CreateSubKey(RegistryKeyLocation);
}
string guid = type.GUID.ToString("B");
RegistryKey bhoKey = registryKey.OpenSubKey(guid, Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree);
if (bhoKey == null)
{
bhoKey = registryKey.CreateSubKey(guid);
}
bhoKey.SetValue("IE Ext", 1);
registryKey.Close();
bhoKey.Close();
}
How can I set name of my BHO which is visible on addons list in IE? At this moment name of extension is taken from namespace of BHO and it looks pretty ugly..
Upvotes: 0
Views: 726
Reputation: 18965
New Answer
You should be able to control the display name using the ProgIdAttribute on your interop class.
Old Answer
It looks like this is possible by setting the (Default) value in your BHO key. Add the following around bhoKey.SetValue("IE Ext", 1);
:
bhoKey.SetValue(string.Empty, "Some Clean BHO Name");
Upvotes: 1