Re: Registry prmissions
- From: "MikeD" <nobody@xxxxxxxxxxx>
- Date: Wed, 12 Mar 2008 21:22:13 -0400
"Howard Kaikow" <kaikow@xxxxxxxxxxxxx> wrote in message
news:eqcfjIJhIHA.4844@xxxxxxxxxxxxxxxxxxxxxxx
My concern is when is it REQUIRED to set such permissions?
You are not SETTING any permissions. I thought I made that clear, but maybe
not. You are REQUESTING the key be opened with a specific permission (or
permissions). The user MUST already have the rights for the permission(s)
you're requesting. If not, opening the key will fail. Therefore, you should
request the lowest permissions necessary for the Registry operation you wish
to perform. Since only you know exactly what you're doing within the
Registry, it's up to you to know what permission you must request.
FWIW, I've yet to come across a situation where I've needed to use anything
other than KEY_READ or KEY_WRITE.
Most examples on the internet and in books do not seem to adjust privs
before reading/writing registry keys.
Because you can't.
I created a new account in the User group and ran a program while logged
into that account.
Read.writing keys was not prevented.
The keys are under HKLM\Software, but other programs might use
HKLM\Software.
I don't see how that can be right. A regular user can read under HKLM but
cannot write under it. I think you made a typo. Did you mean HKCU for one
of those? Members of the Users group can read *and* write to HKCU.
--
Mike
Microsoft MVP Visual Basic
.
- Follow-Ups:
- Re: Registry prmissions
- From: Howard Kaikow
- Re: Registry prmissions
- References:
- Registry prmissions
- From: Howard Kaikow
- Re: Registry prmissions
- From: MikeD
- Re: Registry prmissions
- From: Howard Kaikow
- Registry prmissions
- Prev by Date: Re: GetWindow - Infinite Loop?
- Next by Date: Re: FOF_NO_UI Constant
- Previous by thread: Re: Registry prmissions
- Next by thread: Re: Registry prmissions
- Index(es):
Relevant Pages
|