Link to home
Create AccountLog in
Avatar of Christian de Bellefeuille
Christian de BellefeuilleFlag for Canada

asked on

C++ to do a Screen Capture of "Secured Desktop" (UAC Prompts)

Is there anyone who know how to take screen capture of the secured desktop? (The darker overlay where UAC Prompt appears)

The regular "bitblt" that i'm using doesn't seems to capture these screens.

Thanks
Avatar of TommySzalapski
TommySzalapski
Flag of United States of America image

The whole idea behind the UAC prompt is that Windows limits what processes can run so that malicious software cannot capture your keyboard input (password?), or click the install button for you, or slip by unnoticed.

Your applications are not supposed to be able to interact with the secured desktop at all.

Why do you need to get a screen capture of that desktop? Perhaps we can help you find a different method to achieve the same end result.
Avatar of Christian de Bellefeuille

ASKER

I know the whole idea about the UAC, but i know it's possible to do it (TeamViewer for example do it).

We are developping a solution similar to TeamViewer/VNC/LogMeIn/etc, to allow our users to support their customers remotely.

The point is that if the local user think that his support staff see the prompt, and wait for an action from him... they will wait forever.

I've seen registries like PromptOnSecureDesktop, but from the tests i've done, it has no impact on the result with bitblt.  But maybe i've done something wrong, just setting it to 0 or false might not be enough...
ASKER CERTIFIED SOLUTION
Avatar of Subrat (C++ windows/Linux)
Subrat (C++ windows/Linux)
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
I'll do some reading about this API call and i'll get back later after some tests.   Thanks for this hint Subrat2009
I've not been able to test the solution.  We have something urgent on the Schedule for the next 2 weeks, then i'll be able to try it.

I'll mark your solution as correct, and if i need more help i'll post a new question linked to this one.

Thanks for your help