*Bulletin ID* A2E_187
*Last Review* 3/19/2010
*Revision* 1.0
*Previous IDs* None
*Obsoletes* None

ERROR: Service Failure to Logon MAPI_E_NOT_INITIALIZED, Location 2


When running the service, all synchronization processes log an error to the Event Viewer Add2Exchange log reporting a failure to logon with the MAPI error MAPI_E_NOT_INITIALIZED and Location: 2. The console and other interactive programs have no problem connecting to Exchange. Correcting the MAPI temporary profile directory specified in the registry fixes the behavior.


Synchronization processes run under the service cannot connect to Exchange and give the error listed above. The Add2Exchange console and other interactive applications (Toolbox, etc.) are able to connect without difficulty.


Add2Exchange uses temporary, dynamic profiles to connect to Exchange. While running in an interactive session, these profiles are stored in the registry. When run as a service, however, MAPI automatically stores the profiles in files on the filesystem. If there are problems with the directory in which the profiles are supposed to be stored, such as insufficient permissions or non-existence, then MAPI fails to initialize.

This setting can be verified by finding the key HKEY_LOCAL_MACHINE\Software\Windows\Windows Messaging Subsystem in the registry and examining the ProfileDirectory value. It should be set to the expansion of %systemdir%\temp, where systemdir is your system’s windows directory, usually Windows. Further examples in this article will use the Windows directory to avoid confusion.

More information on this key can be found at:



Add2Exchange sets this value to C:\Windows\temp during installation.

If the ProfileDirectory value is set to something other than C:\Windows\temp, then reset it to C:\Windows\temp. In this case, it is important to make sure that the value is not reset later by some other administrator or process, so be sure to identify why the value was changed in the first place, so you can prevent it from happening again.

Otherwise, verify that the Add2Exchange service account has write rights over the directory.

Applies To

  • Add2Exchange Standard
  • Add2Exchange Enterprise
  • CDO

Keywords: CDO, Add2Exchange, profiles, MAPI_E_NOT_INITIALIZED, location 2