Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Vista Newsgroups > Vista security

UAC blocks windows messages

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 05-30-2007   #1 (permalink)
Martin
Guest


 

UAC blocks windows messages


We have a system that is comprised of 3 executables. They're all about
controlling displays.
1) Service.exe -- A service (running as local system)
2) Main.exe --The main app which is run as as local system too, but
within the interactive user's Session and attached to the user's
input desktop.
3) UI.exe -- A UI executable which runs under the interactive user's
account.

Service launches Main.
Main launches UI, using CreateProcessAsUser(), getting the
QueryUserToken().

UI.exe tries to broadcast WM_DISPLAYCHANGE at certain points which
needs to be heard by Main.exe.
But Main.exe's listening window & thread do not receive that message
if control-panel's UAC is checked on.
(BTW: On XP & win2k all is fine, and also on Vista when UAC=Off.)

Strangely calling ChangeDisplaySettingsEx() in the UI will
successfully cause WM_DISPLAYCHANGE to be heard by main.exe

Using Spy I can see that, for example, the frame of Notepad.exe does
receive the WM_DISPLAYCHANGE message, even though the window-procedure
in Main.exe does not.

I've tried using SendMessage, PostMessage, SendNotifyMessage, all
aimed at HWND_BROADCAST. All suffer the above problem under UAC.
I can add more details on how the processes are created if needs be.

Any suggestions of what's going on, and how I can fix it?
Thanks for any advice. I've been looking at this for a week now.


My System SpecsSystem Spec
Old 05-31-2007   #2 (permalink)
Martin
Guest


 

Re: UAC blocks windows messages

On 30 May, 17:56, Martin <MNVP...@googlemail.com> wrote:

I'll begin to answer my own question, for the benefit of anyone else
baffled by this.

It seems that UIPI (User Interface Privilege Isolation) is the cause.
In summary: a lower privilege process cant send windows-messages to
higher privilege processes.

Its defined in the document: "WindowsVistaUACDevReqs.doc", which can
be downloaded from a link on:
http://technet.microsoft.com/en-us/w.../aa905108.aspx

I'd still like any advice on a possible fix.
Is it possible to have the higher privilege process (Main.exe) that
launches the lower privilege process (UI.exe) open up a deliberate
chink in this UIPI armor?

My System SpecsSystem Spec
Old 05-31-2007   #3 (permalink)
Martin
Guest


 

Re: UAC blocks windows messages

OK, I got there in the end. :-)
Sorry for the noise.
The answer appears to be call ChangeWindowMessageFilter().

My System SpecsSystem Spec
Old 05-31-2007   #4 (permalink)
Jimmy Brush
Guest


 

Re: UAC blocks windows messages

On 31 May 2007 04:56:28 -0700, Martin <MNVPyle@googlemail.com> wrote:

>OK, I got there in the end. :-)
>Sorry for the noise.
>The answer appears to be call ChangeWindowMessageFilter().


You may already know this, but running interactive programs on the
user's desktop running as system is considered a bad thing, even with
Vista's new security.

I'm sure you have a reason for doing so, but it would be better from a
security perspective if all the privileged code was running in your
service, and the only programs running on the users desktop was
running in the context of their user account.

- JB
My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Live Messenger 2008 blocks all links in all messages Big Dave Live Messenger 1 06-24-2008 02:11 AM
Spamkiller (from McAfee) blocks Windows Mail Jean Guillon Vista mail 2 02-22-2008 12:56 PM
Windows Blocks Some Startup Programs Lee Lord Vista performance & maintenance 2 09-16-2007 10:30 AM
Windows Blocks Some Startup Programs Lee Lord Vista General 4 09-15-2007 08:45 PM
Windows Defender Blocks Programs Which Have Been Uninstalled. MrSlartybartfast Vista performance & maintenance 6 05-11-2007 08:29 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

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