none
WindowsAutomation fails when there is no open session RRS feed

  • Question


  • I wrote an automation program which automates another GUI application using the WindowsAutomation feature in .NET 4.0. I do not know the exact technical terms to describe this situation, but ...  it works fine if the programs are actually visible (i.e., I logged in on a real machine, or a remote desktop session is kept open) but it fails if they are not visible (for example, there are two users: A and B, and the programs are running on user A's session, and currently user B is using the computer on the monitor.)

    Is this a common problem, or just the behaviour of the particular application I am automating?
    Sunday, November 24, 2013 3:10 PM

Answers

  • Hello Jeong,

    I feel confused that what program language you have use, C#, C++ or others.

    Does the WindowsAutomation feature in .NET 4.0  mean the Windows Automation API?

    If it is, please check the link below:

    http://msdn.microsoft.com/en-us/library/windows/desktop/ff486375(v=vs.85).aspx

    It shows details for it.

    >> but it fails if they are not visible (for example, there are two users: A and B, and the programs are running on user A's session, and currently user B is using the computer on the monitor.)

    In my opinion, they are in different sessions, they maybe do not able to access each other.

    Since we do not know clearly how the application runs, could you please share it with us to the skydrive?

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, November 26, 2013 6:52 AM
    Moderator