Board index » delphi » HKEY_LOCAL_MACHINE

HKEY_LOCAL_MACHINE

We have some applications which are installed at several systems.

Now we have a problem that the registry key
HKEY_LOCAL_MACHINE\Software\OurCompany\ cannot be accessed by the group
"Everyone" under NT. The group has "special access" rights on the specific
key.

How can i change the rights of the specific keys to "Full Control" using a
simple Delphi app.

Thankx Harry

 

Re:HKEY_LOCAL_MACHINE


Isn't it generally bad form to have someone on a remote machine mess with the
server's registry?  I would suggest that if there are machine specific
settings, that they be set in the machine's registry.  Global settings that are
kept on the server should be kept in a separate data file, rather than the
registry of the server.

Did I not understand the question?

In article <7f77uj$c1...@news.Kijfhoek.NL.net>, "H. van der Valk (from

Quote
stabiplan)" <H.vanderV...@promisbv.com> writes:
>We have some applications which are installed at several systems.

>Now we have a problem that the registry key
>HKEY_LOCAL_MACHINE\Software\OurCompany\ cannot be accessed by the group
>"Everyone" under NT. The group has "special access" rights on the specific
>key.

>How can i change the rights of the specific keys to "Full Control" using a
>simple Delphi app.

>Thankx Harry

Re:HKEY_LOCAL_MACHINE


I think this sounds like the problem I've just been made aware of.

If you try to read a key created by a user with Administrator rights from a
non- Administrator user using the standard Delphi methods it fails.

This problem appears to be due to the RegOpenKeyEx API call security access
mask defaulting to KEY_ALL_ACCESS which is a combination of flags including
WRITE_DAC and WRITE_OWNER. Unfortunately for a non-administrator this causes
the function to fail.

If you open the key without those two flags everything works fine.

I haven't investigated further but I expect I will have to call the
RegOpenKeyEx API function directly or perhaps derive a new version of the
TRegistry class (if I can't find one someone else has already written)

Ken Needham

In article <7f77uj$c1...@news.Kijfhoek.NL.net>,
  "H. van der Valk (from stabiplan)" <H.vanderV...@promisbv.com> wrote:

Quote
> We have some applications which are installed at several systems.

> Now we have a problem that the registry key
> HKEY_LOCAL_MACHINE\Software\OurCompany\ cannot be accessed by the group
> "Everyone" under NT. The group has "special access" rights on the specific
> key.

> How can i change the rights of the specific keys to "Full Control" using a
> simple Delphi app.

> Thankx Harry

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

Re:HKEY_LOCAL_MACHINE


Quote
>I haven't investigated further but I expect I will have to call the
>RegOpenKeyEx API function directly or perhaps derive a new version of the
>TRegistry class (if I can't find one someone else has already written)

You are correct. We have found the solution also. The problem of this is for
a part the TRegister component. This component also uses the specified API
call.

Now we want to change the specific key in the registry to "Full Access"
using Win Api's. It's a crime.

Thankx for the reply
    Harry

Other Threads