문제

I must enter a username/password within a rundll32.exe process window. I've tought of the following:

  1. Get Login window handle from the rundll32.exe process
  2. Focus the window
  3. Inject the text in 2 textbox and click the ok button

Is it possible to do that in .NET or I must resort to lower level win32 api? Anywone as done that before and could point me in the right direction?

도움이 되었습니까?

해결책

You are attempting to retrieve the window handle of the Exchange login dialog of the MAPI application (probably outlook), FROM a rundll32.exe process. This can be done from .Net using the SendKeys class, but this is not completely reliable:

Alternatively you could establish the NETBIOS session in advance using NetUseAdd to establish a session. If this is successful, you will not need to enter the username and password. I don't know if this works with Exchange, but it does work with some other applications which use integrated authentication:

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top