2012-01-10 38 views
2

我已經在SOF以及MSDN論壇上搜索了很多,但不幸的是沒有任何方法可以爲我工作。這是應用的問題和方法。發佈者信息是「不可用」在一個BHO開發使用.net的Internet Explorer

  1. 我開發使用的.Net工具欄的Internet Explorer 7已被註冊爲BHO(瀏覽器輔助對象」使用下面的C#代碼安裝。
  2. 我使用MSI安裝和自定義安裝類文件註冊BHO。這是我如何做它
  3. 我已經簽署了MSI和MSI的MSI和EXE的兩個DLL,生成和簽署。安裝後,我驗證在C:\ Program Files文件\我的測試擴展\我的擴展也有數字簽名。

問題:

問題是:當我在Internet Explorer 7選項中轉到「Managed Addons」時,我在「不可用」下看到擴展名/工具欄,而不是在擴展名/程序集屬性中設置的公司名稱。當我點擊「更多信息」時,「發佈者」不可用。

請告訴我該如何設置「發佈者信息」?我正在使用Verisign公司簽發的密鑰和有效證書。

請告訴我是否做錯了什麼或錯過了什麼。這是我的安裝程序/註冊碼。

  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); 

您的幫助非常感謝。

感謝

史蒂夫

回答

1

集後跟隨的AssemblyInfo.cs信息文件生成DLL。

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

當您註冊該DLL時,請使用以下命令。

regasm /register /codebase YourDLL.dll 

現在它會在IE中顯示您的發行商名稱管理插件。

希望這樣做更有意義。

相關問題