Board index » delphi » Win2k/NT security and D5

Win2k/NT security and D5

Dodgy's obscure question for the day.....

I have a little app which makes changes to the registry, (It just
assigns some file extensions to itself)
Which is fine if you log in as an admin... If you log in as something
else e.g. power user, you get
"Failed to set data for " , OK?"

How can I...
1) Find out what level access the current user has
2) Assign file extensions if they aren't Administrator?

Thanks in advance as they say,

Dodgy.

 

Re:Win2k/NT security and D5


Quote
On Wed, 17 Jan 2001 12:26:34 +0000, Dodgy <Do...@earth.planet.universe> wrote:
>I have a little app which makes changes to the registry, (It just
>assigns some file extensions to itself)
>Which is fine if you log in as an admin... If you log in as something
>else e.g. power user, you get
>"Failed to set data for " , OK?"

>How can I...
>1) Find out what level access the current user has
>2) Assign file extensions if they aren't Administrator?

Under NT, registry keys and subkeys have user permissions the same way
files and directories do on an NTFS disk.  There's no particular right a
user needs to write to the registry (i.e. there's no "user can write to
the registry" permission), he just needs appropriate access to the part
of the registry he wants to modify.  That makes it hard to check for
permissions beforehand; the NT security model involves a lot of ugly
little data structures that are difficult to manipulate.  The best way
to find out if you can do something is to try it and see if you get an
error.

The sorta stupid answer is, if you don't have permission to do it,
you're not supposed to be able to do it.  However, the usual default
setup for an NT or Win2K machine does give normal users write permission
to HKEY_CLASSES_ROOT.  Perhaps it's been changed on your machine, or
during installation someone chose one of the "more secure" setups--which
break most normal Windows apps--including yours.

--
"I don't want you to think I'm not incoherent." -- Harold Ross

Other Threads