Can we execute QTP script on remote machine by keeping session minimized


I have couple of machines on which I wish to schedule exceutions. I need to access these machines remotely for exceution. Whenever I start exceution from these machines and minimize the session my script fails. So just curious to know whether QTP scripts can be executed while keeping sessions minimized. If yes what changes needs to be made in script. Thanks.

Best Solution

When 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, the tests are unable to interact with the tested application’s GUI as the GUI doesn’t actually exist in this case.

You need to change Registry keys on your computer (that is, the computer from which you connect to a remote QTP workstation). Here is a step-by-step description:

  1. Close Remote Desktop sessions opened on your computer.
  2. Click Start and select Run. In the Run dialog box, type regedit and press Enter. Registry Editor starts
  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.

That’s all. Now minimizing the Remote Desktop Connection window on your computer will not affect the remote computer’s GUI and the GUI will still be available to your automated GUI tests.

This was taken from:

Related Question