2

我在 SOF 和 MSDN 论坛上搜索了很多,但不幸的是没有任何方法对我有用。这是问题和应用的方法。

  1. 我使用 .Net 为 Internet Explorer 7 开发了一个工具栏。它使用以下 C# 安装程序代码注册为 BHO(浏览器助手对象)。
  2. 我正在使用 MSI 设置和自定义安装类文件来注册 BHO。这就是我的做法。
  3. 我已经签署了 dll,生成并签署了 MSI 和 MSI 的 EXE。安装后,我在 c:\Program Files\My Test Extension\ 中验证我的扩展也有数字签名。

问题:

问题是:当我在 Internet Explorer 7 选项中转到“托管插件”时,我会在“不可用”下看到我的扩展/工具栏,而不是在扩展/程序集属性中设置的公司名称。当我单击“更多信息”时,“发布者”不可用。

请告诉我如何设置“发布者信息”?我正在使用 Verisign Inc 颁发的密钥和有效证书。

请告诉我是否做错了什么或遗漏了什么。这是我的安装程序/注册码。

            string name = t.Name;
        string help = t.Name;
        rkClass.SetValue(null, name);
        rkClass.SetValue("MenuText", name);
        rkClass.SetValue("HelpText", help);

        rkLMClass.SetValue(null, name);
        rkLMClass.SetValue("MenuText", name);
        rkLMClass.SetValue("HelpText", help);

        rkInprocServer32.SetValue(null, "mscoree.dll");
        rkInprocServer32.SetValue("ThreadingModel", "Both");
        rkInprocServer32.SetValue("Class", t.FullName);
        rkInprocServer32.SetValue("Assembly", "MyTestExtension, Version=1.0.0.0");
        rkInprocServer32.SetValue("RuntimeVersion", "v2.0.50727");

        rkLMInprocServer32.SetValue(null, "mscoree.dll");
        rkLMInprocServer32.SetValue("ThreadingModel", "Both");
        rkLMInprocServer32.SetValue("Class", t.FullName);
        rkLMInprocServer32.SetValue("Assembly", "MyTestExtension, Version=1.0.0.0");
        rkLMInprocServer32.SetValue("RuntimeVersion", "v2.0.50727");

        if (0 != (style & BandObjectStyle.Vertical))
        {
            rkCat.CreateSubKey("{00021493-0000-0000-C000-000000000046}");
            rkLMCat.CreateSubKey("{00021493-0000-0000-C000-000000000046}");
        }
        if (0 != (style & BandObjectStyle.Horizontal))
        {
            rkCat.CreateSubKey("{00021494-0000-0000-C000-000000000046}");
            rkLMCat.CreateSubKey("{00021494-0000-0000-C000-000000000046}");
        }
        if (0 != (style & BandObjectStyle.TaskbarToolBar))
        {
            rkCat.CreateSubKey("{00021492-0000-0000-C000-000000000046}");
            rkLMCat.CreateSubKey("{00021492-0000-0000-C000-000000000046}");
        }
        if (0 != (style & BandObjectStyle.ExplorerToolbar))
            Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Microsoft\Internet Explorer\Toolbar").SetValue(guid, name);

        // register as BHO
        RegistryKey bhoKey = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\" + guid);
        bhoKey.SetValue("NoExplorer", 1, RegistryValueKind.DWord);

非常感激你的帮助。

谢谢

史蒂夫

4

1 回答 1

1

在 AssemblyInfo.cs 文件中设置以下信息后,构建 DLL。

[assembly: AssemblyCompany("Your publisher name")]

当您注册该 DLL 时,请使用以下命令。

regasm /register /codebase YourDLL.dll

现在它将在 IE 的管理插件中显示您的发布者名称。

希望这更有意义。

于 2012-03-29T09:17:33.157 回答