Terminal session when minimized\disconnected returns a blank screen upon capturing desktop snapshot

前端 未结 5 1337
陌清茗
陌清茗 2020-12-15 06:51

I am using the below JAVA code to capture the desktop of a remote machine

    Robot robot = new Robot();
    BufferedImage screenShot = robot.createScreenCap         


        
5条回答
  •  温柔的废话
    2020-12-15 07:43

    A simpler alternative to the above answers to to transmute the terminal session (RDP) into the console session. The session will then display to the physical screen (Switching the user of anyone currently logged into the physical machine). The following command does this:

    for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (tscon.exe %%s /dest:console)
    

提交回复
热议问题