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 :)

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

http://www.csharphelp.com/archives2/archive430.html

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.