Minimized Remote Desktop Connection

PROBLEM

I am executing tests on a remote machine using Remote Desktop Connection/Protocol. It works correctly as long as the RDC window is active and/or maximized. However the tests fail when the RDC window is minimized.

SOLUTION

This is a common issue with all UI automation tools. To run tests on a remote machine while the RDC window is minimized, add registry keys on the computer from which you connect to the remote machine:

  1. Click the Windows Start button.
  2. Type regedit in the Run box and press Enter.
  3. Find the registry key:
    • HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client
  4. Create a DWORD value with the name RemoteDesktop_SuppressWhenMinimized and set its value to 2.
  5. Find the registry key:
    • HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Terminal Server Client
  6. Create a DWORD value with the name RemoteDesktop_SuppressWhenMinimized and set its value to 2.