I have a farm of virtual windows servers and they are aut开发者_如何学JAVAonomously running various desktop applications and I want to have easy way to see what's going on on each server without connecting through RDP. So I have created a simple AutoIt script which automatically runs every minute and creates a screenshot of virtual servers desktop:
#NoTrayIcon
#include <WinAPI.au3>
#include <ScreenCapture.au3>
#include <WindowsConstants.au3>
$LocalIP = _getLocalIP()
_ScreenCapture_Capture($CmdLine[1] & "\network\shared\screenshot_" & $LocalIP & ".jpg")
...
The problem I am having is that screenshot only displays desktop with apps when I am connected to it through RDP, once I close it - screenshot will appear black and only mouse pointer is visible.
Is there any way I can create screenshot even if RDP session is closed? Is that possible?
Like mentioned in previous replies - this is probably due to the machine being locked. You can try to use a script that will unlock the remote station, and then perform a screen capture. Have a look at this post in autoit forum
精彩评论