Which registry keys determine the Outlook Profile

103,201

Solution 1

This has changed in Outlook 2013:

Profiles are stored under keys:

HKEY_CURRENT_USER\Software\Microsoft\Office\<version>\Outlook\Profiles

Where <version> is one of the following:

  • Office 97 – 7.0
  • Office 98 – 8.0
  • Office 2000 – 9.0
  • Office XP – 10.0
  • Office 2003 – 11.0
  • Office 2007 – 12.0
  • Office 2010 – 14.0 (sic!)
  • Office 2013 – 15.0
  • Office 2016 – 16.0

The above version info was copied from this answer.

Solution 2

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook


HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Simple MAPI-CMC

Solution 3

Firstly, for Outlook 97-2010 the profiles are stored in HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles.

Starting with Outlook 2013 (which supports side-by-side installations), the profiles are stored in HKEY_CURRENT_USER\Software\Microsoft\Office\%version%\Outlook\Profiles, where %version% is 15.0 for Outlook 2013, 16.0 for Outlook 2016, etc.

On the low (Extended MAPI) level, RPC-over-HTTP (ROH) settings are determined by the ROHFLAGS_USE_ROH bit in the PR_PROFILE_RPC_PROXY_SERVER_FLAGS property (0x66230003). That property is set in the global profile section as well as the particular Exchange store profile section (since Outlook now supports multiple Exchange accounts in a single profile).

You can see the data in OutlookSpy (I am its author) - click IMAPISession button on the OutlookSpy ribbon, click OpenProfileSession, select the {C8B0DB13-05AA-1A10-9BB0-00AA002FC45A} pbGlobalProfileSectionGuid entry from the combo box.

Note that Extended MAPI cannot be used from VB (or .Net). If using Redemption/Profman (I am its author) is an option, you can use the following script to enumerate all profiles and check if ROH is used:

  PR_PROFILE_RPC_PROXY_SERVER_FLAGS  = &H66230003
  ROHFLAGS_USE_ROH = 1

  set Profiles=CreateObject("ProfMan.Profiles")
  for i = 1 to Profiles.Count
    set Profile = Profiles.Item(i)
    set GlobalProfSect = Profile.GlobalProfSect
    Debug.Print "Profile: " & Profile.Name & " ------"
    flags = GlobalProfSect.Item(PR_PROFILE_RPC_PROXY_SERVER_FLAGS)
    If TypeName(flags) = "Long" Then
      if (flags And ROHFLAGS_USE_ROH) = ROHFLAGS_USE_ROH Then
        Debug.Print "   ROH is used"
      Else
        Debug.Print "   ROH is not used"
      End If
    Else
      Debug.Print "   No PR_PROFILE_RPC_PROXY_SERVER_FLAGS"
    End If
  next

If you are already running Outlook and want to check that the current profile uses ROH, you can use RDOSession.ExchangeConnectionProperties.UseROH property:

set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
MsgBox Session.ExchangeConnectionProperties.UseROH
Share:
103,201
TechGeek
Author by

TechGeek

Technical Geek :)

Updated on July 09, 2022

Comments

  • TechGeek
    TechGeek almost 2 years

    I need to write a VBScript code to check whether outlook is using MAPI profile or RPC over HTTP/S profile.

    So can anybody let me know which registry key decides the same?

    Please help.

  • Dmitry Streblechenko
    Dmitry Streblechenko over 8 years
    No, this is wrong. Profiles are stored on per-version basis only starting with Outlook 2013 (15). Prior to that the profiles are in HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles
  • Dmitry Streblechenko
    Dmitry Streblechenko over 8 years
    "Outlook" above is the profile name. It can be different depending on the profile name. The registry key is only valid in Outlook 2010 or older. Outlook 2013 and newer store profiles in a different key (see my reply above).