GpgOL says: Failed to find gpg4win dir

Hi!

On MS Windows 8.1 Pro. 64-bit I first installed Gpg4win 2.2.6 - all components except GPA. The GpgOL extension worked fine with MS Outlook 2013. As soon as I stared Outlook, Kleopatra also started minimized in the System Tray.

This month I uninstalled ver. 2.2.6 and installed ver. 2.3.1 - all components except GPA. After that I noticed the following issue: Kleopatra doesn’t start with Outlook any more. Also, I can’t start it with the Start Certificate Manager icon in the GpgOL toolbar in Outlook. And as you know, you can’t encrypt/decrypt messages in Outlook unless Kleopatra is running.

If I activate the GpgOL log, the following records are logged after I click the Start Certificate Manager icon in the GpgOL toolbar in Outlook:

12:28:43/7876/gpgoladdin.cpp:GetIDsOfNames: GetIDsOfNames for: btnCertManager
12:28:43/7876/gpgoladdin.cpp:Invoke: enter with dispid: 6040
12:28:45/7876/gpgoladdin.cpp:GetIDsOfNames: GetIDsOfNames for: startCertManager
12:28:45/7876/gpgoladdin.cpp:Invoke: enter with dispid: 5
12:28:45/7876/ribbon-callbacks.cpp:getContext: contextObj: _Explorer
12:28:45/7876/engine-assuan.c:connect_uiserver: UI server not running at: “C:\Users\rpr\AppData\Roaming\gnupg\S.uiserver”, starting it
12:28:45/7876/ERROR/Failed to find gpg4win dir
12:28:45/7876/ERROR/engine-assuan.c:connect_uiserver: UI server not installed

The error saying “Failed to find gpg4win dir” is likely the reason why Kleopatra doesn’t start.

But I can successfully start Kleopatra through Windows Start Menu. Gpg4win is installed in the default directory, “C:\Program Files (x86)\GNU\GnuPG”, which contains kleopatra.exe.

Is there a way to fix that issue?

Currently, I can workaround that issue by making Kleopatra start automatically after logging in to Windows.

– rpr.

GpgOL.log (2.01 KB)

Hi,

There was a change related to the lookup to prepare for Gpg4win-3.0 where the registry keys will be slightly changed.

Can you open the registry editor and check that:

HKEY_LOCAL_MACHINE\Software\Wow6432Node\GNU\GnuPG “Install Directory” exists and points to “C:\Program Files (x86)\GNU\GnuPG” ?

Or does:
HKEY_LOCAL_MACHINE\Software\GNU\GnuPG “Install Directory” exist?

The registry key should have been created during installation. I have no Idea why this would have failed for you.

Are you using some kind of Registry Cleaner tool or something like that?

Regards,
Adnre

Andre,

It seems that the Registry value is set correctly:

reg query HKLM\SOFTWARE\WOW6432Node\GNU\GnuPG

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\GNU\GnuPG
Install Directory REG_SZ C:\Program Files (x86)\GNU\GnuPG

What else could be wrong?

– rpr.

Urgh!

This is an actual bug caused. I can reproduce this.
Sorry it’s pretty bad that this was missed in our pre release testing. This should have been caught!

Thanks for reporting it. This is a major problem and we will move forward with a 2.3.2 release to fix this.

There is also a related error if you try to start Kleopatra through a context menu action of the windows explorer as gpgex would pick up the wrong Kleopatra binary.

Btw. I’ve fixed this in gpgol with:
http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgol.git;a=commitdiff;h=a10532b6cf3527391bdb14470fbebf0205b9253a

and gpgex with:
http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgex.git;a=commitdiff;h=5c19ffe9d71d6e6763d6e47a67f1ca0a1651e39f

I’ve released 2.3.2 just now that should fix this problem.

Thanks for your precise report with the debug output!

Andre, thank you for quick fix. I can confirm that v. 2.3.2 starts Kleopatra as expected.

BTW, I noticed a small glitch regarding the DirMngr service that is installed by gpg4win: the installation does not set a description of the service in the Registry. The Services management console displays an empty description – see the attached screenshot.

The procedure that creates the service should set a nice description of the service in the following Registry key:
HKLM\SYSTEM\CurrentControlSet\Services\DirMngr
value: Description
type: REG_SZ

– rpr.

Clipboard01.png