Bypass Credentials UI

Oct 22, 2008 at 3:26 AM
I have situation where the code that I am writing need to run on a machine that does not and cannot have a trust relationship with the domain which contains the exchange mailboxes that I would like to login to. The issue that I have is when I try to re-factor some of the MFCMapi code to access the remote exchange server, I am unable to bypass the login ui.

I would like to find a way to bypass the login UI. Is this possible? Any hints?

Thanks Much!
Oct 22, 2008 at 11:34 AM
You have to create the process that's connecting to an Exchange mailbox in the context of a user who has the right to access that mailbox.  I recommend CreateProcessWithLogonW.
Oct 23, 2008 at 4:03 PM
Interesting... I did a proof of concept using runas /netonly and that seemed to work. The issue that I am now running into is that I would like to have User A Spawn a process as User B that uses network credentials of User C. CreateProcessWithLoginW only allows me to create a netonly process as the current user spawning the process...

Seem that this post no loger fits in this discussion board. I will find a better place for it and post back.

Thanks for the help.