我正在以这种方式注册我的BHO:
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();
}
如何在IE中的插件列表中设置我的BHO名称?此时,扩展名称取自BHO的命名空间,看起来很丑陋......
答案 0 :(得分:1)
新答案
您应该可以使用互操作类上的ProgIdAttribute来控制显示名称。
旧答案
看起来可以通过设置BHO键中的(默认)值来实现。在bhoKey.SetValue("IE Ext", 1);
附近添加以下内容:
bhoKey.SetValue(string.Empty, "Some Clean BHO Name");