Hello there, after days of researching I finally managed to finish my dragging and dropping of mail items in MS Outlook. But I have this annoying pop up thing in MS Outlook, a security pop up that grants you access from the range of 1-10mins so that I can drag drop mail items. I found lots of third party application to download in order to remove the pop up but I think it is much better if I will use C# code or VSTO code. Do you have any idea? Thanks :)

Dani AI

Generated

Short summary and practical next steps tied to the thread

The Outlook pop‑up you see is the Object Model Guard / Programmatic Access protection that prevents outside processes from silently reading or sending mail. Converting the logic so it runs inside Outlook (an in‑process COM/VSTO add‑in that uses the Application object Outlook gives you) is the clean, supported fix; registry hacks or per‑process tricks often fail or are blocked by policy/AV. (learn.microsoft.com)

Why your registry change didn’t help

Older Outlook versions used different registry keys (CheckAdminSettings); Outlook 2007+ relies on the AdminSecurityMode / PromptOOM* policy keys under the Office policies path and on Trust Center / antivirus state. Editing the wrong hive or an obsolete key won’t suppress the prompt you posted. If you need a policy change it should be done by an administrator via Group Policy (or the correct Policies path), not by ad‑hoc per‑user edits. (learn.microsoft.com)

Supported alternatives (pick one)

  • Build an Outlook COM/VSTO add‑in so the code runs in‑process and is trusted by Outlook’s object model. (learn.microsoft.com)
  • Use a server API (Microsoft Graph or EWS) to move/send items without automating the Outlook client. This moves work off the client and avoids the prompt entirely. (learn.microsoft.com)
  • If you must automate the client from an external process, consider a vetted library (for example Outlook Redemption) or Extended MAPI; both are common workarounds but are third‑party or native and carry licensing/support tradeoffs. (dimastr.com)

Practical checklist

  1. If possible, rewrite the feature as a VSTO add‑in (test locally). 2) If you must use registry/GPO, involve the domain admin and set AdminSecurityMode/PromptOOM* under the correct Office version path. 3) Never use “Never warn” in production — it weakens security. 4) Back up the registry and test on a non‑production machine first. (learn.microsoft.com)

Notes for and : ’s registry approach points in the right direction for some environments, but use the AdminSecurityMode/PromptOOM* keys (and the correct hive/version) or, better, convert the code to an add‑in so Outlook treats the calls as trusted. (learn.microsoft.com)

Recommended Answers

All 15 Replies

sorry that one did require a license key, is that the message you are referring to though?

sorry that one did require a license key, is that the message you are referring to though?

Yes, this is the message that I'm referring to.

did you read my above post with how to fix it in the registry? you can easily do that with c#

Yes I have read it sir, thanks for the info. I'm not really that familiar with the registry work around. Uhmmm, the code snippet found in the article, should I place it in my application?

registry is nothing to be afraid of, pretty seamless to navigate around it, here's a link if you need a start

you can open HKCU or default, then go to the subkey and set the value, as long as you have permissions, you should be good to go :-)

From where or what part of my application should I include the editing of the registry? In the drop event function or in a seperate function? Thanks!

Hello again, I have already changed the settings but the pop up still exists. I placed the editing of the registry on the loading of my form. This is what I did:

RegistryKey theKey = Registry.CurrentUser;
            theKey.OpenSubKey(".DEFAULT",true);
            theKey.SetValue("CheckAdminSettings", 1);

Please Help. Thanks!

You can do it for all users (HKEY_USERS\.DEFAULT) or current user (HKEY_CURRENT_USER), we'll do the setting for all all users, it will look the same almost for current user

//opens HKEY_USERS
RegistryKey k = Registry.Users;

//opens path off HKEY_USERS
RegistryKey securityKey = k.OpenSubKey(@"Software\Policies\Microsoft\Security", true);

//Set registry value
securityKey.SetValue("CheckAdminSettings", "00000001", Microsoft.Win32.RegistryValueKind.DWord);

to do it for current user, just change the top line to Registry.CurrentUser

also be prepared, you will prob run into permission issues if you are non admin and accessing .DEFAULT, otherwise if you edit currentuser, the current user should have privileges to their own reg hive, but i've seen some machines locked down enough where they don't, you'll get it :-)

Hello again sir, It seems that in my registry, I can't find the Software\Policies\Microsoft\Security folder. So it has n CheckAdminSettings. Any advice on what to do? I'm not really familiar with the workaround in the registry. Thanks again.

instead of OpenSubKey, use CreateSubKey

Hello there again. I have managed to create the CheckAdminSettings and have its value as 1 but the pop-up is still showing. Any thoughts?

I just noticed that the content of the pop up shown in the link that you gave me is kind of different from the pop up in my Outlook. I have attached here the pop up that appears in my Outlook. Are they treated the same? I'm really confused. All of the help sites that I have found displays the pop up the same with the one shown in the link you've given. Please help. Thanks again.

ahhh that one is a tad bit different

here's someone with the same problem on expert's exhange
http://www.experts-exchange.com/Software/Office_Productivity/Groupware/Outlook/Q_20639755.html

here's a quote from the following link that may be of interest

The key issue for developers is what is actually trusted: It's the Outlook.Application object that is passed by the add-in architecture. Therefore, in order to avoid Outlook object model security prompts, the add-in must derive all Outlook objects from this Outlook.Application object. In VSTO add-ins (Visual Studio 2008 and VSTO 2005 SE), that would be the Globals.ThisAddin.Application object. In shared add-ins using the IDTExtensibility2 interface, that would be the Application object passed as an argument by the OnConnection event.

http://www.outlookcode.com/article.aspx?ID=52

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.