Forum Discussion

nandini_thota's avatar
nandini_thota
Contributor
2 years ago

Desktop invisible error when system is locked while running regression

Hi Community,   I've my office laptop - Consider Machine1 I am connecting to Client VDI from Machine1 - Consider this is Machine2 From my Machine2, I am connecting to self hosted agent where buil...
  • rraghvani's avatar
    2 years ago

    Prepare your TestExecute machine as mentioned in Running Tests via Remote Desktop

     

    Create your batch file to run your TC project on the VM. Run it, and make sure it works. Then create a scheduled task to call the batch file on your VM. Run the scheduled task, and make sure it works.

     

    On the VM, call tscon. This will disconnect you from the VM, but your session will remain active. From another computer, connect to your VMs Task Scheduler, and run the the schedule task, make sure it works.

     

    If you connect to your VM, Task Manager will show two active sessions. Your current session and the pervious session.

     

    Try and understand how the above works, and you should then be able to configure your job.

     

    If you run the following, you'll see the output it generates. And, tscon is expecting either session id or name as a parameter

    for /f "skip=1 tokens=3" %s in ('query user %USERNAME%') do (echo %s)
    
    or
    
    query user %USERNAME%