Domanda

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?

È stato utile?

Soluzione

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:

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top