Absent Member.. MisterT1968 Absent Member..
Absent Member..

QTP/(U)FT Support Tip: Indepht information about RDP connections.

Hello all,


How are you? I hope you are fine


As you all know, we do not support running tests, when the remote machine is either locked, logged off, or the RDP session is minimized. Most probably you got always the question "Why?"


When the machine is locked or a RDP session is minimized/closed, the Operating System acts the same way as if you log out of the machine. This causes some features to be disabled, some of which are required by QTP/(U)FT and ALM/QC to perform any test execution:


• Session 0 (affecting DCOM communication between ALM/QC and any testing tool)
• UI windows messages (affecting QTP test execution).


When you locked the machine, the Operating System disables the GUI and some Windows messages, including mouse and the keyboard messages. These messages are used independently of the Graphic engine used by the Operating System. Some QTP/(U)FT methods use these system messages to communicate and interact with the application under test (AUT) and, considering they are disabled by the Operating System, QTP will fail the test because is not possible to interact with (send these messages to) the AUT.


Also, when running the testing tool (QuickTest Professional, Service Test, UFT) remotely from ALM/QC on a Terminal/Citrix server (Including Windows Server Environments), there is no problem as long as the machine is logged in. However, if the user wants to run the script remotely from a ALM/QC client machine when there is no user logged on to the machine, this is technically not possible to be done.


Due to a Microsoft design limitation, DCOM servers could be only run on the Operating System Session 0, which is the session of the console running on the server machine and only enabled when there is a user logged to the machine.


For more information about this operating system limitations with Locked Machines or no user logged please refers to following QC/QTP:


http://support.openview.hp.com/selfsolve/document/KM175908 (Does TestDirector support remote execution in Citrix environment)
http://support.openview.hp.com/selfsolve/document/KM180557 (QTP will fail when the remote desktop is minimized when using Windows XP remote connection )
http://support.openview.hp.com/selfsolve/document/KM185060 (Can QuickTest Professional replay on a locked machine)




Note: All the workarounds are not tested or guaranteed by HP Software Support, some of the could even cause unexpected behavior.


1. Consider using VNC instead of RDP for remote connection, one of the most popular VNC apps it’s RealVNC: http://www.realvnc.com
2. Consider to use a third party software called to prevent the machine get automatically locked due inactivity or any other reason:


a. Caffeine
b. “NoSleep” from Symantec

3. Try the following workaround for Minimized RDP connections for QTP 11 and RDP 6.0:


This specific version has a workaround that you could try in order to run the scripts even when the session is minimized:


a. If the registry key does not exist, create the RemoteDesktop_SuppressWhenMinimized registry value (DWORD type) in one of the following registry paths on the remote computer:


HKEY_CURRENT_USER\Software\Microsoft\Terminal ServerClient\RemoteDesktop_SuppressWhenMinimized


HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal ServerClient\RemoteDesktop_SuppressWhenMinimized


b. Set the data for this value to 2


4. Use the TSCON command from Windows:


a. Open 'notepad' with administrator privileges,
b. Enter the following command: tscon.exe 1 /dest:console
c. Save the file using the .bat suffix and make sure you are using the “All files” type format instead of “.txt”
d. Navigate to the file, right-click, click make shortcut on your desktop.
e. Use this icon to disconnect your machines instead of just close the RDP session or use the “End session” button.
f. When the .bat file disconnects you on the machine you're sitting at, it simultaneously should unlock the screen on the remote machine


We already have an open Enhancement Request about this limitation, you can subscribe to the ER at the following link:



I hope these information helps answering the "Why?" question better


Best regards,

Tino Pacholski

Functional Testing Support Engineer

[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]
Labels (2)
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.