Manually

  1. Launch the robot on the remote machine. If the robot is to be launched according to the schedule configured on this machine, you can skip this step.

  2. Open cmd and run the query session command. The session number (ID) of the current user is required:


    This number changes with each new connection to the machine, so it makes no sense to memorise it for permanent use.

  3. Perform the command tscon.exe <ID> /dest:console



  4. Result: the open session is put into console mode, the connection to the remote desktop is closed, and the robot stays running or will be scheduled to start at the right time.

Read More: https://support.smartbear.com/testcomplete/docs/testing-with/running/via-rdp/keeping-computer-unlocked.html

With the help of a robot

It is not necessary to perform all the commands described in the first method yourself. They can also be performed by the robot itself. You just need to add the actions of performing these commands via cmd to the beginning of the target algorithm. But before launching the robot, you must restart the ROBIN Agent as administrator. You do not need to close the RDP connection yourself, but wait for the robot to do so.

With a bat file

To avoid opening cmd every time and entering commands manually, you can simply run a pre-created bat-file, which already contains the necessary commands. The file should also be run as administrator and only after step 1 of the first method. You do not need to change the session ID in the file, it is determined automatically. The same bat-file can be run by the robot itself, using the "Run script file" action (an example of how to fill in the action in the diagram attached above). But before launching the robot, the ROBIN Agent must be restarted as administrator. You should not close the RDP connection yourself, but wait for the robot to do so.


  • Нет меток