While setting up the Windows Power Automate Desktop (WPAD) Worker Machine on a spare machine, connecting the Worker machine via RDP or Remote Desktop is never advised. You may notice that when you connect to a Worker Machine running any RPA / Automation software it will stop working the moment you Minimize the RDP window, Close the RDP window or lock your physical machine through which you have connected to the Worker machine.
This is expected behaviour as to how RDP works. Below is some explanation:
If the user minimises the Remote Desktop application, it causes the remote session to switch to a GUI-less mode which does not display windows or controls. When this occurs, Windows Power Automate Desktop (WPAD) is unable to interact with these applications causing the script to stop.
There are certain hacks or workarounds that can be done to make this work but they are not foolproof and may result in a failed execution of the bot. It is always recommended that the Worker machine is not remotely accessed to avoid any interruption in between.
Alternately use the below steps that may help in using RDP as a medium to connect.
To prevent Remote Desktop from switching to a GUI-less mode when minimized, choose one of the following. The following steps must be completed under a Windows profile with administrative privileges on the host computer (the one accessing the machine with the robot, therefore, the user computer):
- Close all Remote Desktop sessions
- Launch the Registry Editor by typing regedit.exe in the Windows Run command
- Locate the following registry key:
a. To change the setting for all user accounts:
HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client\ - Create a new DWORD value in this key named RemoteDesktop_SuppressWhenMinimized
- Specify 2 as the value data
- If you are using a 64-bit version of Windows, you should also add the RemoteDesktop_SuppressWhenMinimized value to the following keys under Wow6432Node:
a. To change the setting for all user accounts:
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Terminal Server Client\ - Reboot the computer for the changes to take effect
Additionally, it can be relevant to disable RD clipboard redirection to avoid the user and robot to overlap when copying and pasting things at the same time. To prevent this, complete the following steps on the host/user computer, using a Windows profile with administrative privileges.
- Close all Remote Desktop sessions
- Launch the Registry Editor by typing regedit.exe in Windows Run command
- Locate the following registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client\ - Create a new DWORD value in this key named DisableClipboardRedirection
- Specify 1 as the value data
- If you are using a 64-bit version of Windows, you should also add the DisableClipboardRedirection value to the following keys under Wow6432Node:
a. To change the setting for all user accounts:
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Terminal Server Client\ - Reboot the computer for the changes to take effect