title: How to prevent outlook security popup on Win Terminal Server 2019 when sending mails via COM?
body: <p>When we try to create/open a new mail in outlook from our C#/VB.Net WinForm App via COM on a <b>WINDOWS TERMINAL SERVER</b> we get an outlook security popup saying "<b>A program is trying to access</b> ..."</p>
  
  <p>However, on a PC there is no such popup as long as updated anti-virus software is running. So the problem only occurs when running the app in a terminal server session.</p>
  
  <p>I configured a GPO in the domain to trust the dlls, which are interacting with outlook via COM:</p>
  
  <p><b>User Configuration\Administrative Templates\Microsoft Outlook 2016\Security\Security Form Settings\Programmatic Security\Trusted Add-ins</b></p>
  
  <p>There I added the hashes for each dll created according to the <a href="https://docs.microsoft.com/en-us/previous-versions/office/office-2007-resource-kit/cc179085(v=office.12)?redirectedfrom=MSDN" rel="nofollow noreferrer">description</a> in the document "Group policy overview" (link on the bottom of that site) (see section "Manage trusted add-ins for Outlook 2007" in that word document)</p>
  
  <p>I also set the <b>AdminSecurityMode=3</b> in the registry so outlook security is taking the GPOs to validate security.</p>
  
  <p>On the Terminal Server session, I successfully verified that the group policies are loaded/applied (with cmd tool "rsop.msc") and the registry entry is there.</p>
  
  <p>Nevertheless, the outlook security dialog still pops up for terminal service users.</p>
  
  <p>We have WinServer 2019 and Outlook 2019.</p>