Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Fri, 20 Jun 2008 12:16:01 -0700,    group: microsoft.public.platformsdk.security        back       


Single Application Instance and UAC   
I am trying to both limit my application to a single instance and pass 
arguments to the existing instance if another instance is started by the 
end-user.

I am using the technique of a named global mutex to detect another instance 
and then passing a windows message using PostMessage() to the other instance 
to pass arguments to it.

When running on Vista with UAC enabled, the calls to PostMessage() fail with 
ERROR_ACCESS_DENIED. Other calls to ShowWindow() and SetForegroundWindow() 
are also failing the same way.

Does anyone know of a solution/approach for solving for this when UAC on 
Vista is running?
date: Fri, 20 Jun 2008 12:16:01 -0700   author:   Mike

RE: Single Application Instance and UAC   
Hi,

What your are experiencing is certainly coming from the UIPI mechanism in 
Vista (User Interface Privilege Isolation). If my guess is correct, the two 
instances are NOT running under the same integrity level.
In order to correct that, you should call, at the beginning of your program 
before any thing else, the function ChangeWindowMessageFilter with the value 
of the message to want to exchange and the parameter dwFlag specified as 
MSGFLT_ADD. Doing so will allow any instance of your program to accept 
receiving the given message even if it comes from processes with a lower 
integrity level.

I hope my diagnosis is correct...tell me if you still experience the access 
denied error on PostMessage using my suggestion.

Cheers,
-- 
Mounir IDRASSI
IDRIX
http://www.idrix.fr

to reach : mounir_idrix_fr (replace the underscores with the at and dot 
characters respectively)


"Mike" wrote:

> I am trying to both limit my application to a single instance and pass 
> arguments to the existing instance if another instance is started by the 
> end-user.
> 
> I am using the technique of a named global mutex to detect another instance 
> and then passing a windows message using PostMessage() to the other instance 
> to pass arguments to it.
> 
> When running on Vista with UAC enabled, the calls to PostMessage() fail with 
> ERROR_ACCESS_DENIED. Other calls to ShowWindow() and SetForegroundWindow() 
> are also failing the same way.
> 
> Does anyone know of a solution/approach for solving for this when UAC on 
> Vista is running?
date: Sat, 21 Jun 2008 16:06:00 -0700   author:   Mounir IDRASSI am

RE: Single Application Instance and UAC   
Thank you Mounir, this has solved my issue!


"Mounir IDRASSI" wrote:

> Hi,
> 
> What your are experiencing is certainly coming from the UIPI mechanism in 
> Vista (User Interface Privilege Isolation). If my guess is correct, the two 
> instances are NOT running under the same integrity level.
> In order to correct that, you should call, at the beginning of your program 
> before any thing else, the function ChangeWindowMessageFilter with the value 
> of the message to want to exchange and the parameter dwFlag specified as 
> MSGFLT_ADD. Doing so will allow any instance of your program to accept 
> receiving the given message even if it comes from processes with a lower 
> integrity level.
> 
> I hope my diagnosis is correct...tell me if you still experience the access 
> denied error on PostMessage using my suggestion.
> 
> Cheers,
> -- 
> Mounir IDRASSI
> IDRIX
> http://www.idrix.fr
> 
> to reach : mounir_idrix_fr (replace the underscores with the at and dot 
> characters respectively)
> 
> 
> "Mike" wrote:
> 
> > I am trying to both limit my application to a single instance and pass 
> > arguments to the existing instance if another instance is started by the 
> > end-user.
> > 
> > I am using the technique of a named global mutex to detect another instance 
> > and then passing a windows message using PostMessage() to the other instance 
> > to pass arguments to it.
> > 
> > When running on Vista with UAC enabled, the calls to PostMessage() fail with 
> > ERROR_ACCESS_DENIED. Other calls to ShowWindow() and SetForegroundWindow() 
> > are also failing the same way.
> > 
> > Does anyone know of a solution/approach for solving for this when UAC on 
> > Vista is running?
date: Mon, 23 Jun 2008 09:05:01 -0700   author:   Mike

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us