 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ted Guest
|
Posted: Tue May 24, 2005 5:36 pm Post subject: registry permissions |
|
|
Hi,
OK, my next app I'm going to rethink how and where to drop user/app
settings, but for now I have a problem of regular users having write
permission on my app's key in HKEY_LOCAL_MACHINE. This is not a networked
app, and I don't care about user uniqueness, just the ability of multiple
users on one machine to be able to write to my key programmatically. .Simply
would like a painless way to set full permissions to Everyone on my apps key
after the administrator installs.
Thanks
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Tue May 24, 2005 6:41 pm Post subject: Re: registry permissions |
|
|
"Ted" <ttripp (AT) rankexec (DOT) com> wrote
| Quote: | Simply would like a painless way to set full permissions to Everyone
on my apps key after the administrator installs.
|
Look at RegSetKeySecurity().
Gambit
|
|
| Back to top |
|
 |
Ted Guest
|
Posted: Tue May 24, 2005 8:35 pm Post subject: Re: registry permissions |
|
|
OK, thanks. I should have Tamarack'd "registry security" and not "registry
permissions".
I'm looking through Tamarack and not seeing any snippets or other useful
information. It looks like anytime anyone asks for examples on this topic,
they end up singing with the crickets.
Thanks
Ted
"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> wrote
| Quote: |
"Ted" <ttripp (AT) rankexec (DOT) com> wrote in message
news:42936611$1 (AT) newsgroups (DOT) borland.com...
Simply would like a painless way to set full permissions to Everyone
on my apps key after the administrator installs.
Look at RegSetKeySecurity().
Gambit
|
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Tue May 24, 2005 9:56 pm Post subject: Re: registry permissions |
|
|
"Ted" <ttripp (AT) rankexec (DOT) com> wrote
| Quote: | I'm looking through Tamarack and not seeing any snippets
or other useful information.
|
Deja is a much better place to search, as it has a larger newsgroup archive.
In any case, I did a search on Tamarack and found a couple of tidbits pretty
quickly:
1)
use RegGetKeySecurity() to retreive the current SECURITY_DESCRIPTOR for
the desired key, then call SetSecurityDescriptorDacl() to set the DACL to
NULL, and then call RegSetKeySecurity() to assign the SECURITY_DESCRIPTOR
back to the key.
2)
regedit.exe has the same bug that people's Delphi programs tend to... It
tries to open the registry with KEY_ALL_ACCESS - which fails. KEY_ALL_ACCESS
includes KEY_CREATE_LINK, but HKLMSoftware by default has 'Everyone's'
security set to exclude 'Create Link', although it allows reading and
writing.
regedt32 doesn't have the problem.
That's all true for NT4, anyway - but maybe Win2000 is subtley
different. To find out, log in as an Administrator, run regedt32, select
HKLMSOFTWARE, select SecurityPermissions from the menu, and see what it's
set to. On NT4 it's
CREATOR OWNER Full Control
Administrators Full Control
SYSTEM Full Control
Everyone Special (Includes read, write, create key, delete)
Also, a search at MSDN shows the following:
Registry Key Security and Access Rights
http://msdn.microsoft.com/library/en-us/sysinfo/base/registry_key_security_and_access_rights.asp
Gambit
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|