Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > SendInput fails on UAC prompt

Reply
Thread Tools Display Modes

SendInput fails on UAC prompt

 
 
Damian
Guest
Posts: n/a

 
      03-20-2010

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
System.Diagnostics.Process.Start)
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
sizeOfInputStructure);

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?

Thanks,
Damian
 
Reply With Quote
 
 
 
 
Gene E. Bloch
Guest
Posts: n/a

 
      03-22-2010
On Sat, 20 Mar 2010 10:38:01 -0700, Damian wrote:

> 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
> System.Diagnostics.Process.Start)
> 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
> sizeOfInputStructure);
>
> 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?
>
> Thanks,
> Damian


Consider posting in a developers' newsgroup or forum...Although a few
people here (not me) have some knowledge in that area.

--
Gene E. Bloch letters0x40blochg0x2Ecom
 
Reply With Quote
 
Dan.at
Guest
Posts: n/a

 
      06-29-2010

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...

thanks,
Dan.


 
Reply With Quote
 
Gene E. Bloch
Guest
Posts: n/a

 
      06-29-2010
On Tue, 29 Jun 2010 02:37:31 -0700, Dan.at wrote:

> 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...
>
> thanks,
> Dan.


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 (Stumbling Bloch)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I reinstall media player 11 for vista?? Voodoo Windows Vista Installation 2 05-30-2007 04:44 AM
how to open a cmd prompt? Amanda Windows Vista File Management 5 04-20-2007 08:52 PM
Trying to understand UAC before installing Vista... Swifty Windows Vista Administration 2 03-19-2007 11:27 PM
First UAC secure desktop prompt not so smooth on Ati Radeon 9550. GT Windows Vista Hardware 1 03-04-2007 09:09 AM
USB Flash Drives (thumbdrives) fails to install TonyR Windows Vista Installation 0 02-12-2007 08:53 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59