在使用"SupressWhenMinimzed"安全关闭RDP会话后,远程计算机的屏幕分辨率会更改. [英] Screen resolution changes for the remote machine after safely closing the RDP session with "SupressWhenMinimzed"

查看:575
本文介绍了在使用"SupressWhenMinimzed"安全关闭RDP会话后,远程计算机的屏幕分辨率会更改.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先对(可能不太具体)标题感到抱歉,因为它包含多个主题.

First of all sorry for the (maybe not so specific) title as it consists of multiple topics.

我遇到的atm问题与我的测试自动化设置有关.它由一台处理BE + FE并开始测试本身的linux机器组成.我通过RDP会话连接到Windows Server 2008(终端),这是运行实际测试的地方.为了自动化,我使用Ranorex.

The issue atm i'm having is related to my test automation setup. It consists of a linux machine handling the BE + FE and starting of the test themselves. And a Windows Server 2008 (Terminal) to which i connect through RDP session and it's the place the actual tests are run. For automation purposes i use Ranorex.

首先,我如何设置Win机器: 由于Ranorex是一个GUI测试自动化工具,因此它需要对AUT(被测应用程序)可见的组件,因此,您需要在不关闭会话本身的情况下关闭RPD客户端,否则测试将开始失败.

First of all how i have the Win machine set up: As Ranorex is a GUI test automation tool it needs to have the components visible for the AUT (application under test) and for this reason you need to close the RPD client without closing the session itself otherwise the test will start failing.

为此,我使用以下代码创建了一个bat文件:

For this i created a bat file with the following code:

%windir%\System32\tscon.exe RDP-Tcp#0 /dest:console

并在HKEY_LOCAL_MACHINE \ Software \ Microsoft \ Terminal Server Client下添加了一个reg条目DWORD值

And added a reg entry DWORD value under HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client

RemoteDesktop_SuppressWhenMinimized

的值为2.

此操作是在以管理员权限运行bat文件之后,它将关闭RDP会话,但仍将保持与Win Server计算机的终端连接打开,以允许运行测试.

What this does is after running the bat file with admin rights it will close the RDP session but will still keep the terminal connection open to the Win Server machine allowing the tests to be run.

现在的问题是,安全关闭会话后,为左侧打开的会话设置的分辨率为1024x768,而打开RDP连接时的分辨率为1920x1200.

Now the issue on hand is that after closing the session safely the resolution that gets set for the left open session is 1024x768 while when RDP connection is open it is 1920x1200.

所以最后我无法回答自己的问题:是否可以为保持打开状态的会话指定分辨率?

So finally the question which i haven't been able to answer myself: is it somehow possible to specify the resolution for the session that is kept open?

推荐答案

我不得不处理类似的问题.我通过在计算机上安装 Dameware MiniRemote Control 代理解决了该问题.通过Dameware Mini远程控制应用程序连接到它后,您可以更改RDP中无法使用的分辨率. (RealVNC或类似产品可能会按照其他人的建议工作,但我没有尝试过)

I had to deal with the similar issue. I resolved it by installing Dameware MiniRemote Control agent in the machine. Once you connect to it via Dameware Mini Remote Control application you can change the resolution which you can't in RDP. (RealVNC or similar ones might work as others suggested, I didn't try them)

一些不适用于我的解决方案

Some solutions which didn't work for me

  1. QRes.exe/x:1920/y:1200 http://qres.sourceforge.net/
  2. Windows Management Instrumentation(内置):wmic desktopmonitor创建screenheight = 1920,screenwidth = 1200
  3. ChangeScreenResolution: http://tools.taubenkorb.at/change-screen-resolution/
  4. 永久窗口: http://www.ninjacrab.com/persistent-windows/
  1. QRes.exe /x:1920 /y:1200 http://qres.sourceforge.net/
  2. Windows Management Instrumentation (in-built) : wmic desktopmonitor create screenheight=1920, screenwidth=1200
  3. ChangeScreenResolution : http://tools.taubenkorb.at/change-screen-resolution/
  4. Persistent windows: http://www.ninjacrab.com/persistent-windows/

这篇关于在使用"SupressWhenMinimzed"安全关闭RDP会话后,远程计算机的屏幕分辨率会更改.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆