twalrant / OutlookGnuPG

GnuPG addin for Outlook 2007
http://wiki.github.com/twalrant/OutlookGnuPG
GNU General Public License v3.0
18 stars 5 forks source link

Plugin installs, but does not show up in Outlook (or disappears after Outlook upgrade) #41

Open mleopold opened 14 years ago

mleopold commented 14 years ago

Hi All, I'm having some problems with the updated version of the plugin - it installs with no problems, but in Outlook the buttons doesn't show up and the plugin is shown as "inactive" and I'm unable to activate it. If I install the original cumps.be it seems to install and work.

I don't know what kind of debug info I can give you, but I've tried both standalone and windows installers with the same result. I'm using Outlook 2007 12.0.6514.5000 SP2 MSO 12.0.6425.1000.

Br, Martin Leopold

lfeistel commented 14 years ago

I second this issue. The plugin installed with no errors, but it only shows up under Inactive Application Add-ins. When I try to Manage COM Add-ins and check OutlookGnuPG, the change is not saved and it remains inactive. Restarting Outlook has no effect, turning off Macro Security has no effect, unchecking Apply macro settings to installed Add-ins has no effect. I've also tried some of the registry hacks I've seen related to this issue in locations like HKLM\SOFTWARE\Microsoft\Office\12.0\Common and HKLM\SOFTWARE\Microsoft.NETFramework\Security\TrustManager\PromptingLevel and still no effect.

I then added this system environment variable: VSTO_SUPPRESSDISPLAYALERTS=0 and now at least I have something else to work with, but I am still stumped. I am running Windows 7 x64 with Outlook 2007 (12.0.6514.5000) SP2 MSO (12.0.6529.5000).

I get the following error message:

Object reference not set to an instance of an object.

\ Exception Text ** System.NullReferenceException: Object reference not set to an instance of an object. at Starksoft.Cryptography.OpenPGP.GnuPG.GetGPGInstallLocation() at Starksoft.Cryptography.OpenPGP.GnuPG.SetExe() at Starksoft.Cryptography.OpenPGP.GnuPG.SetDefaults() at Starksoft.Cryptography.OpenPGP.GnuPG..ctor() at OutlookGnuPG.OutlookGnuPG.OutlookGnuPG_Startup(Object sender, EventArgs e) at Microsoft.Office.Tools.AddIn.OnStartup() at OutlookGnuPG.OutlookGnuPG.FinishInitialization() at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.ExecutePhase(String methodName) at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.ExecuteCustomizationStartupCode() at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.ExecuteEntryPointsHelper()

\ Loaded Assemblies ** mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

Microsoft.VisualStudio.Tools.Applications.Runtime Assembly Version: 8.0.0.0 Win32 Version: 8.0.50727.940

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.dll

System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

System.Xml Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

Microsoft.Office.Tools.Common Assembly Version: 8.0.0.0 Win32 Version: 8.0.50727.940

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Tools.Common/8.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.dll

System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System.Drawing Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

OutlookGnuPG Assembly Version: 1.2.3667.26057 Win32 Version: 1.2.*

CodeBase: file:///D:/Program%20Files/OutlookGnuPG/OutlookGnuPG.DLL

Microsoft.Office.Interop.Outlook Assembly Version: 12.0.0.0 Win32 Version: 12.0.4518.1014

CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.Office.Interop.Outlook/12.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.Outlook.dll

Microsoft.Office.Tools.Common2007 Assembly Version: 8.0.0.0 Win32 Version: 8.0.50727.940

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Office.Tools.Common2007/8.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common2007.dll

office Assembly Version: 12.0.0.0 Win32 Version: 12.0.6425.1000

CodeBase: file:///C:/Windows/assembly/GAC/office/12.0.0.0__71e9bce111e9429c/office.dll

Starksoft.Cryptography.OpenPGP Assembly Version: 1.0.130.0 Win32 Version: 1.0.130.0

CodeBase: file:///D:/Program%20Files/OutlookGnuPG/Starksoft.Cryptography.OpenPGP.DLL

System.Configuration Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

Any help with this issue will be greatly appreciated. Getting GPG working in Outlook is amazingly difficult, but it seems like this plugin should do the trick. Too bad about all the Microsoft Office issues causing installation difficulties.

doegox commented 14 years ago

I could finally reproduce your problem. There is a bug in the gpg.exe path discovery when the plugin is installed (and when Outlook is upgraded). Currently I don't have any tools to recompile the plugin but here is a workaround:

The bug occurs when GPG wasn't installed with a windows installer and therefore doesn't appear in the Registry. So the trick is to add a registry item just to bypass this bug, then once settings of the plugin are configured you can remove the Registry item.

So here is a procedure:

1) Open Registry & go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall 2) You should NOT have a key called "GnuPG". If you have a key called GnuPG then your problem is different and this procedure won't help you. 3) Create a key called "GnuPG" 4) In that key create a "string value" called "InstallLocation", leave its value empty 5) Go to Tools / Trust Center / Add-ins / "Manage COM Add-ins" + Go / Select OutlookGnuPG / Ok 6) Close Outlook 7) Open Outlook. The plugin should be active and prompting you for its settings. 8) You can now safely remove the key & string you added to the Registry at steps 3 & 4

Note to the developer: to reproduce the issue:

IMHO the issue is the line 735 of GnuPG.cs hKeyLM.Close(); which should be guarded as: if (hKeyLM != null) hKeyLM.Close();