Sendkeys in remote minimized machine VBS

瘦欲@ 提交于 2019-12-02 03:31:05

If you minimise the Remote Desktop window (the window that displays the remote computer’s desktop), Windows switches the remote session to a GUI-less mode and doesn't display windows and controls. This means you can't interact with the desktop while the session is minimised and therefore your UFT/QTP script (that's what it looks like to me anyway) will fail.

As a possible workaround, you can try the following steps:

  1. On your local computer, close all open Remote Desktop sessions.
  2. Launch the Registry editor (regedit.exe).
  3. Navigate to one of the following Registry keys, depending on whether you wish to modify the Remote Desktop settings only for the current user or for all users on the computer:

    HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client

    HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client

  4. Create a DWORD value named RemoteDesktop_SuppressWhenMinimized and set it to 2.

  5. Close the Registry Editor.

Now, when you minimise the remote session on your local desktop, the GUI availability on the remote machine should be unaffected and your test case should continue to run OK.

Hope that helps...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!