locked
Remote controlling the secure desktop RRS feed

  • Question

  • I am making a remote control application work on Vista.  I have a service that launches an app on the logged-on user's desktop and simulates the keystrokes and mouse moves of a remote user, as well as sending the local screen to the remote user.

    Everything works fine until the user tries to do something that requires a privilege elevation--when the consent dialog comes up, my app detects a desktop switch but when I call OpenInputDesktop() I get error 5 (ERROR_ACCESS_DENIED).  Since I can't call SetThreadDesktop() with the handle of the input desktop, this makes it impossible for my app to simulate keystrokes or mouse moves to approve the action. 

    I can understand that the Secure Desktop was designed to prevent this very thing.  However, using terminal services the remote user can approve actions at the secure desktop.   I'd like to know how to do the same thing.

    Monday, October 30, 2006 11:39 PM

All replies

  • The architecture of terminal services is very different from yours though...
    The output/input stacks are redirected at a much lower level. The local display adapter and keyboard are irrelevant in remote sessions.

    Note that the built-in remote assistance feature has the same limitations as your solution... because it works in a similar manner.
    The workaround in that case is to temporarily disable the prompting on the secure desktop (there's a UAC policy to that effect in the security options category).

    Tuesday, October 31, 2006 1:10 AM