Wednesday, November 7, 2012

How to execute QTP scripts in a remote machine when the window is minimized?

QTP Version : 11 or later
RDP Version : 6 or later

If you want to run QTP scripts run on a remote machine and if that Remote machine/Window is minimized, then the scripts will fail.

In order to overcome the issue, you need to add a registry key in Windows registry on your client machine/from the machine where you initiating the remote desktop.
1. Close all your remote desktops.
2. Create a registry "RemoteDesktop_SuppressWhenMinimized" if does not exist in the below path:
   HKEY_CURRENT_USER\Software\Microsoft\Terminal ServerClient\RemoteDesktop_SuppressWhenMinimized
   or
   HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Terminal Server Client\RemoteDesktop_SuppressWhenMinimized
3. Set the value for this data to 2.

If you would like to add the registry key by just running a .reg file follow below steps:
1. Open Notepad.
2. Cope the below content:
 Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Terminal ServerClient\RemoteDesktop_SuppressWhenMinimized]
"RemoteDesktop_SuppressWhenMinimized"=dword:00000002

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Terminal Server Client\RemoteDesktop_SuppressWhenMinimized]
"RemoteDesktop_SuppressWhenMinimized"=dword:00000002
3. Save the file as "FileName.reg" format
4. Now, double click on this reg file, so that registry keys will be added.

No comments: