By default, Windows Vista/7/8's UAC prompt is shown on a secure desktop. Unfortunately the Print Screen key doesn't seem to have any effect when viewing the secure desktop. I can see the reasoning behind this - no user-mode application should be able to capture the contents of the secure desktop.

However, my question remains: is there any way to get a screenshot of this desktop?


Edit: perhaps it would help if I explain the problem.

I am currently running Windows 8 and I have a small DisplayLink-based monitor that I would like to use. This driver was just released and works great - except it breaks on the secure desktop. I want to post a bug report on the forums there and in order to do so, I'd need a screenshot. Obviously the problem won't manifest itself on the standard desktop - and running Windows in a VM is impossible because Windows 8 requires hardware virtualization (which I don't have) and getting USB monitors to work with a VM is tricky at best anyway.

link|improve this question

79% accept rate
4  
You can run it in a virtual machine. – jdigital Jan 27 at 0:35
@user8368: That's not an option since I'm trying to get the screenshot to demonstrate a particular hardware problem that may not show up in a VM. It's also not an option from a licensing perspective. And lastly, I don't have hardware virtualization, so it would make the whole thing very difficult. – George Edison Jan 27 at 0:41
1  
You can set the UAC prompt to not use the secure desktop through (Local) Group Policy. – billc.cn Jan 27 at 0:42
@billc.cn: I know, but then the problem that I'm trying to get a screenshot of won't manifest itself. – George Edison Jan 27 at 0:44
@GeorgeEdison: Are you sure? By turning off the Secure Desktop, the UAC prompt will still fire. But since it isn't on the secure desktop, other applications can screenshot it. – surfasb Jan 27 at 1:05
show 1 more comment
feedback

3 Answers

up vote 30 down vote accepted

I have found a rather "black hat" way of doing it...

enter image description here

When in a secure desktop, the accessibility tools still work just fine... so, I used my copy of FastStone Capture Portable, I went to c:\windows\system32 and renamed osk.exe to osk.exe.old and copied/renamed fscapture.exe from the Faststone directory to osk.exe inside the system32 directory.

I then went to a UAC prompt and pressed Win Key+U, and clicked on the "on screen keyboard" option.

And... FastStone Capture started, although it was just a trial... using it under this mode looses my license details.... I was able to take a picture just fine and save it... although, when I thought I was saving to my desktop, it actually went to c:\windows\syswow64\config\systemprofile\desktop... you learn something new every day!

Based on the above, I always thought that the UAC secure desktop was an elevated environment using your own credentials, but, I guess it is actually launched under the System user - so, Print Screen may actually be work, it just may not be under your user - with this in mind, if you were to use a copy of paint instead of Fast Stone Capture, take a screenshot then launch Paint through the On Screen Keyboard hack, it may just work the same!

edit --- update ---

Paint is out the window! Just tested my theory and it didn't work, I am not sure the exact reason, but, I am guessing if you use pretty much any screen capture tool and my method above, it should work.

link|improve this answer
2  
This is brilliant! – iglvzx Jan 27 at 1:51
1  
This is a very clever use of the accessibility tools :) – George Edison Jan 27 at 2:47
2  
I suspect Paint doesn't ask for UIAccess permissions to play nice with UIPI, whereas the other accessibility applications do. See UIAccess for UI automation applications over here for the requirements. – ta.speot.is Jan 27 at 3:17
@todda.speot.is Interesting and will read as I am interested to learn, but, I think there may be more to it as well - I can't imagine Faststone Capture implementing this, it must be that print screen is simply disabled by default and most screen capture utilities just override default behaviour... (I know MS has the technology to disable bits - e.g. MS DRM enterprise suite (forget real name) disables print screen and many other features). – William Hilsum Jan 27 at 9:33
+1 for work around – Joshua Drake Jan 27 at 16:17
feedback

Get a digital camera and take a picture of the screen.

link|improve this answer
This also came to mind for me as well. Not as elegant but much less of a headache. – Paperlantern Jan 27 at 4:13
feedback

However, my question remains: is there any way to get a screenshot of this desktop?

A process running as SYSTEM and installed in an appropriate location can bypass UIPI and get on to the Secure Desktop.

Leverage the existing programs that do this -- RealVNC (not the free edition, unfortunately) and UltraVNC for example.

Run the server on your PC and connect the client to it from another computer. Take a screenshot of the client window.

Although it's probably just as easy to take a picture of the screen.

link|improve this answer
Oh that's right... I have another machine I can VNC to and see the secure desktop - I totally forgot about that. – George Edison Jan 27 at 2:40
feedback

Your Answer

 
or
required, but never shown

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