SendInput fails on UAC prompt

Discussion in 'Windows Vista General Discussion' started by Damian, Mar 20, 2010.

  1. Damian

    Damian Guest

    I am upgrading a c# Remote Control application (like VNC) to handle UAC
    prompts. I've found that SendInput is failing. Here is what i have done:
    1. A windows service launches the app on the user desktop running with
    SYSTEM account priviledges
    2. The app then launches a second app using ShellExecute (using
    3. The second app has uiAccess=true in the manifest file and is now also
    running under the SYSTEM account. It is authenticode signed and is located in
    c:\program files
    4. During remote control it is able to screen capture the UAC dialog

    The problem is that when calling SendInput to move the mouse or send
    keyboard commands it fails silently on the UAC secure desktop (but works fine
    on the regular desktop).

    Here is the method for SendInput:
    static extern UInt32 SendInput(UInt32 numberOfInputs, INPUT[] inputs, Int32

    Is there some other reason that Vista/Windows 7 is blocking the SendInput
    command? If i can screen capture then why not send keyboard/mouse commands?

    Damian, Mar 20, 2010
    1. Advertisements

  2. Consider posting in a developers' newsgroup or forum...Although a few
    people here (not me) have some knowledge in that area.
    Gene E. Bloch, Mar 23, 2010
    1. Advertisements

  3. Damian Guest

    hi :)

    i also do have the same problem with sendinput and the UAC.
    is there already a solution? (can't find anything elsewhere..)

    would be _really, really_ helpful if someone answers with a little hint...

, Jun 29, 2010
  4. You could begin by following the advice I gave in the post you replied to -
    and start your own new thread, rather than piggy-backing off an ancient
    thread. That way you might get more attention.
    Gene E. Bloch, Jun 29, 2010
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.