How do I make sure that my user session keeps unlocked if I close my remote session?

Ranorex Remote requires an active user session to run tests on a remote machine. You can connect to a remote machine using a remote desktop connection (RDP). As long as this remote connection is active, the remote machine is unlocked and tests can be executed. If you disconnect the RDP session, your remote machine will be locked. As no GUI is available in locked mode, your remote tests will fail.

Ranorex Agent shipped with Ranorex 6.0.1 and later includes the setting 'Keep Session Active', which is enabled by default. So no further steps are required.
Find more information in section Configure Ranorex Agent.

To keep the remote session unlocked even if you've disconnected the RDP session in Ranorex 6.0, please follow these instructions: 

 

  1. Create a batch file on your remote machine and insert the code below:
    for /f "skip=1 tokens=3 usebackq" %%s in (
      `query user %username%`
    ) do (
     %windir%\System32\tscon.exe %%s /dest:console
    )
  2. Save this batch file on the desktop of your remote machine and name it: 'KeepSessionOpen.bat'.
  3. If you need to disconnect the RDP session, you can now simply run this batch file using administrator privileges and your remote machine will remain unlocked. 

 

Note: As this mechanism will keep your remote machine unlocked even if you've disconnected your RDP session, an essential security mechanism is now disabled. Please beware that your remote machine can now easily be accessed as the system security is disabled. We advise you to not store sensitive data on your remote machine.
posted on 2017-02-23 12:12  夏威夷的雪人  阅读(559)  评论(1编辑  收藏  举报