CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 1999
    Posts
    6

    MAPI email sync run from NT 'AT' command

    I have some code which using MAPISession, simply logs into an exchange server using a Profile ( Name set in the MAPISession Control), and using NT Password Authentication (Set in the profile). This works fine when run by the user currently logged into the NT PC, But a requirement is that it runs as a schedule using NT's AT command which runs all schedules under the "system" user context. The email sync then fails because the "system" user has no mailbox on the exchange server. I think that once the schedule starts the app as "system" I then need to execute the remaining code under the logged in users context.

    Can anyone Please give any suggestions on how to do this ?


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: MAPI email sync run from NT 'AT' command

    the Platform SDK has quite a few APIs for creating a process in the context of the logged on user.
    checkout CreateProcessAsUser for example.


  3. #3
    Join Date
    Jul 1999
    Posts
    6

    Re: MAPI email sync run from NT 'AT' command

    Thanks for you help,

    I've used CreateProcessAsUser to succesfully run the email sync using the NT AT command.

    But, my next hurdle is to syncronise the email using the 'AT' command when the PC is turned on but no user is logged on. When I try this the process is created, but seems to hang when it attempts to connect to Exchange.

    Could this be that the process doesnt have the same level of authentication as a normal logon ?




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured