View Single Post
Old 02-28-2007   #3 (permalink)
Simon


 
 

Re: Why can my app write successfully to HKLM\Software under Vista?

> First, you are running the app non-elevated right?

That's right. I can run as a non-elevated admin or as a standard user (also
non-elevated - can they be elevated?). It doesn't make any difference.

> check the ACL on
> the key in HKLM. There are areas that ordinary users can write to still.


OK - I hadn't got this at all. When my program is installed (for historical
reasons) the registry key for the application (i.e. the application subkey
within the company subkey, within HKLM\Software) is given Full Control
permission to Everyone, and this is inherited by all of its sub-keys. This
is the reason it's OK to write to these areas? Because they've already been
set with those permissions at install time?

So let me get this right - does this mean I don't need to bother about any
of this UAC stuff? That because I've given everyone permission to write to
my key anyway, I can carry on as normal with no problems? It just seems
counter to everything Microsoft seems to be pushing for...

Simon

"Jesper" <Jesper@discussions.microsoft.com> wrote in message
news:5FD8A31F-1302-4BCE-8CA1-A4C24F5FBC0E@microsoft.com...
>> Everything I read consistently tells me that if UAC is enabled under
>> Vista
>> (which it is on my PC) an ordinary application (post-install) which does
>> not
>> have any kind of manifest at all, cannot write to the HKLM\Software area
>> of
>> the registry. Instead, what is supposed to happen is that Virtualization
>> is
>> supposed to redirect the write to
>>
>> HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\Software
>>
>> Well it doesn't.

>
> First, you are running the app non-elevated right? If so, check the ACL on
> the key in HKLM. There are areas that ordinary users can write to still.
> Virtualization only happens if the user gets an access denied on write.



My System SpecsSystem Spec