Running Interactive Tasks in Minimized Remote Desktop Windows

Published: 11/23/11

The Microsoft Windows operating system includes the Remote Desktop component that allows you to connect to a remote computer and work with it as with your local computer. This is a common way to run and monitor automated tasks on remote computers: you connect to the remote computer using a Remote Desktop Connection (RDC) and use the Remote Desktop window to work with the remote computer on your PC.

There is a pitfall using this scenario: you may not minimize the Remote Desktop window (that is, the window which displays the remote computer’s desktop), or your GUI interactive tasks will fail. If you minimize this window, the operating system switches the remote session to a GUI-less mode and does not display windows and controls. As a result, Automate will be unable to interact with the application’s GUI as the GUI doesn’t actually exist in this case.

Keeping the Remote Desktop window visible may be inconvenient, as it will occupy some part of or even your entire screen, and you will have less space for running your local applications.

We have found a way to bypass this limitation. The workaround is simple: you need to change Registry keys on your computer (that is, the computer from which you connect to a remote Automate workstation). Here is a step-by-step description:

1. Close Remote Desktop sessions opened on your computer.

2. Launch the Registry editor (Regedit.exe).

3. Locate any of the following Registry keys:

   HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\
   (if you want to change the RDC settings for your user account)

   -- or --

   HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client\
   (if you want to change the RDC settings for all accounts)

4. Create a new DWORD value in this key named RemoteDesktop_SuppressWhenMinimized. Specify 2 as the value data.

5. If you use a 64-bit operating system, add the RemoteDesktop_SuppressWhenMinimized value to the following keys under the Wow6432Node node:

   HKEY_CURRENT_USER\Software\Wow6432Node\Microsoft\Terminal Server Client\
   (if you want to change the RDC settings for your user account)
   
   -- or --

   HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Terminal Server Client\
   (if you want to change the RDC settings for all accounts)

   This way the Registry tweak will work in both 32-bit and 64-bit versions of the Remote Desktop client.

Now minimizing the RDC window on your computer will not affect the remote computer’s GUI and the GUI will still be available to your automated GUI tasks.