Re: RegOpenKeyEx and QueryValueEx to get values from registry
From: Tom Esh (tjeshGibberish_at_earthlink.net)
Date: 03/29/04
- Next message: Ilya Margolin: "Re: IN Function?"
- Previous message: Rick Rothstein: "Re: control renaming"
- In reply to: Rui Oliveira: "RegOpenKeyEx and QueryValueEx to get values from registry"
- Next in thread: anonymous_at_discussions.microsoft.com: "Re: RegOpenKeyEx and QueryValueEx to get values from registry"
- Reply: anonymous_at_discussions.microsoft.com: "Re: RegOpenKeyEx and QueryValueEx to get values from registry"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 29 Mar 2004 12:23:43 -0500
On Mon, 29 Mar 2004 05:26:51 -0800, "Rui Oliveira"
<anonymous@discussions.microsoft.com> wrote:
>I am using RegOpenKeyEx and QueryValueEx to get values
>from registry.
>
>The problem is that, this only works for users the local
>administrator rights. When I tried with an user with
>just 'Users group' or 'Power Users group' rights, the
>QueryValueEx functions returns an empty value.
>...
>lRetVal = RegOpenKeyEx(HKEY_LOCAL_MACHINE, sKeyName, 0,
>KEY_ALL_ACCESS, hKey)
The problem is KEY_ALL_ACCESS. User's don't have it and you don't need
it in this case. Best approach is to use the minimum permission that
works. KEY_READ should be sufficient.
-Tom
MVP - Visual Basic
(please post replies to the newsgroup)
- Next message: Ilya Margolin: "Re: IN Function?"
- Previous message: Rick Rothstein: "Re: control renaming"
- In reply to: Rui Oliveira: "RegOpenKeyEx and QueryValueEx to get values from registry"
- Next in thread: anonymous_at_discussions.microsoft.com: "Re: RegOpenKeyEx and QueryValueEx to get values from registry"
- Reply: anonymous_at_discussions.microsoft.com: "Re: RegOpenKeyEx and QueryValueEx to get values from registry"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|