How to screen capture a disconnected remote desktop?

Posted on 2009-04-18
Last Modified: 2013-11-21
I wrote a small Java app that capture the screen ans sends it by email.

I logged on using remote desktop to a Windows XP Pro server and ran the application.
While I am logged on to the server I recieve the good screencaptures to my email.

When I disconnect from the server without ending the session I keep getting emails but the images are black / blank.

I tried capturing the screen by emulating a PRTSCR key or by Robot.captureScreen but with no luck.

I would like to get print screens even when I am disconnected from the server. Is there a way to config Windows so it will not turn off display when I disconnect?
Question by:ElishaMoshe
    LVL 11

    Expert Comment

    I'd suggest that RDP being a service would be conserving resources by not producing screen data for disconnected sessions. You could try logging in using the console or admin switches and see if your code works.

    eg mstsc /console
         mstsc /admin

    (Depending on your version of RDP client).


    Author Comment

    Thanks for the reply.

    I am connecting from a Windows XP Home SP3.
    I tried with "mstsc /admin" (I saw that I have this switch using "mstsc /?") but with no luck.

    Accepted Solution

    I did not find a solution to my question but I did find a solution to my problem.

    As my application is a Java app instead of using Windows Print Screen I can use Swing abilities to capture the screen.

    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice gd = ge.getDefaultScreenDevice();
    GraphicsConfiguration gc = gd.getDefaultConfiguration();
    BufferedImage bImage = gc.createCompatibleImage(component.getWidth(), component.getHeight(), Transparency.OPAQUE);
    Graphics2D g = bImage.createGraphics();

    Open in new window


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do email signature updates give you a headache?

    Do you feel like you are constantly making changes to email signatures? Are the images not formatting how you want them to? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today.

    Remote Desktop Protocol or RDP has become an essential tool in many offices. This article will show you how to set up an external IP to point directly to an RDP session. There are many reasons why this is beneficial but perhaps the top reason is con…
    Problem Description: Actually I found the below issue with some customers after migration from SMS 2003 to SCCM 2007 and epically if they change site code, some clients may appear in the console with old site code, plus old sites still appearing …
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now