Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a rather specialized application that HAS to work in a certain way. It works as a client application on a server. That means I have to be logged on for it to run. At the same time, I cannot keep an RDP connection open at all times, so I have to disconnect after a while.

The application runs fine while I'm disconnected (I only disconnect, I do not log off). However, part of what the application does is that it takes a screenshot of the server. The screenshot comes out fine while I'm logged on, but once I disconnect it comes out black.

Is there some setting in Windows I can change to allow it to take screenshots while I'm disconnected?

Please note: I cannot change the software or the circumstances, only Windows settings.

Update: I actually have a solution, I just don't want to use it because it entails security risks. Using the command "control userpasswords2" I can allow a certain user to be logged on automatically when the server starts. This works well, but it is amazingly insecure so I am hoping not to have to resort to this.

share|improve this question
1  
Don't you mean "Is there some setting in Windows I can change to allow it to take screenshots while I'm disconnected" ? If you're logged off, the application would be terminated. –  jscott Feb 25 '13 at 18:40
1  
Log into the console session instead of an RDP session and leave it running then?? –  TheCleaner Feb 25 '13 at 18:43
    
jscott, you're right, I got confused. I corrected the question now. TheCleaner, I will try that. –  Niels Brinch Feb 25 '13 at 19:16
    
@TheCleaner I tried logging on with -console and then disconnecting, the result is the same. Screenshots are black. –  Niels Brinch Feb 25 '13 at 19:21
    
Sorry, I mean literally at the console (physically at server). Any RDP connection that gets disconnected would cause Windows to stop drawing the session until reconnection. You'll need to physically log in at the server and let the app run. –  TheCleaner Feb 25 '13 at 19:24

1 Answer 1

up vote 4 down vote accepted

RDP sessions have a black screensaver. If you take a screenshot while a screensaver is up, that is all you will see. Disable the screensaver, so it doesn't come up on the disconnected sessions.

In gpedit.msc: User Configuration -> Administrative Templates -> Control Panel -> Display

Edit: apparently this screensaver only applies if the session is still connected. @TheCleaner is right disconnected session aren't drawn.

From this old answer about rdp console: How to keep user logged-in when disconnecting from RDP session

You can redirect a logged in session to console. It will stay active, but you'll need to redirect it back to rdp when you want to reconnect. Just tried this and it showed the 'console' session as active even when rdp was disconnected.

To redirect to console:

tscon <session#> /dest:console

Then when you want to reconnect to it:

tscon <session#> /dest:<rdp-tcp#>

Initially:

  • Login via rdp initially to create the session and start the application.

  • Redirect the session # to console. Let it run for intended duration.

To reconnect:

  • Login via rdp to create a new session

  • Redirect the console session to the new rdp session

share|improve this answer
1  
+1 - Didn't know about the RDP sessions screensaver. Learn something new everyday –  JamesBarnett Feb 25 '13 at 19:32
    
I disabled Screen Saver and Screen Saver timeout and tried again. It didn't work. I also tried logging off and on and it still didn't work. The screenshot becomes black as soon as I disconnect from the RDP session. (the application still works otherwise) –  Niels Brinch Feb 25 '13 at 19:40
    
It appears that thecleaner was right. Disconnected rdp session aren't drawn at all. Even minimizing them would cause trouble. Using /dest:console as a placeholder, or an alternative remote access tool like VNC are the only workarounds. –  Ryan Feb 25 '13 at 20:23
    
Win2k8 doesn't have a console session. –  Simon Catlin Feb 25 '13 at 20:25
    
It works! Thankyou so much! One minor detail: The resolution is apparently way WAAY low when the console has the session. Any hints on keeping a higher resolution? –  Niels Brinch Feb 25 '13 at 20:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.