Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > Re: Registry rights under Vista

Reply
Thread Tools Display Modes

Re: Registry rights under Vista

 
 
Kyle Alons
Guest
Posts: n/a

 
      01-07-2009
"DavidW" <> wrote in message
newscV8l.125866$...
> Hello,
>
> I am a developer. What parts of the Windows registry are writable and
> readable under an Standard User account? I assume that branches off
> HKEY_CURRENT_USER\Software are okay, but I need to be able to make changes
> for all users. If this can only be done under an Adminstrator account I
> still have a problem. I can create a key under
> HKEY_USERS\.DEFAULT\Software in Regedit in an Administrator account, but I
> get an access violation when I try to create it by calling RegCreateKeyEx
> from within my application. Is this the right location in the registry for
> all-user information, and, if so, how do I write to it from within an
> application?
>


Your question applies to much more than Vista. Non-admin users haven't been
able to edit other user or machine registry data since Windows 2000.
http://msdn.microsoft.com/en-us/library/ms995853.aspx

The only difference in Vista is that by default, unelevated admin users
can't either.
http://www.kinook.com/blog/?p=40

You might want to rethink whether you really have to do it, but if you must
modify the registry for all users, during installation (require admin
rights), you could make a subkey of HKEY_LOCAL_MACHINE editable by all
users.

--
---------------------
Kyle Alons
http://www.kinook.com


 
Reply With Quote
 
 
 
 
Ben Voigt [C++ MVP]
Guest
Posts: n/a

 
      01-08-2009
DavidW wrote:
> Kyle Alons wrote:
>> "DavidW" <> wrote in message
>> newscV8l.125866$...
>>> Hello,
>>>
>>> I am a developer. What parts of the Windows registry are writable
>>> and readable under an Standard User account? I assume that branches
>>> off HKEY_CURRENT_USER\Software are okay, but I need to be able to
>>> make changes for all users. If this can only be done under an
>>> Adminstrator account I still have a problem. I can create a key
>>> under HKEY_USERS\.DEFAULT\Software in Regedit in an Administrator
>>> account, but I get an access violation when I try to create it by
>>> calling RegCreateKeyEx from within my application. Is this the right
>>> location in the registry for all-user information, and, if so, how
>>> do I write to it from within an application?
>>>

>>
>> Your question applies to much more than Vista. Non-admin users
>> haven't been able to edit other user or machine registry data since
>> Windows 2000. http://msdn.microsoft.com/en-us/library/ms995853.aspx

>
> I know, but the difference with Vista is that the RegCreateKeyEx call
> fails even for an administrator. It works in XP.
>
>> The only difference in Vista is that by default, unelevated admin
>> users can't either.
>> http://www.kinook.com/blog/?p=40

>
> And that appears to be what's killing me. I don't get an elevation
> prompt either. The call just fails with "Access denied".


Ahh, here is your problem AND how we are going to fix it. The elevation
prompt isn't triggered by behavior that requires elevation. It is triggered
by the file name or the manifest embedded in the executable. Google for
runAsInvoker vs runAsAdmin. Once you mark your program runAsAdmin then the
elevation prompt will appear and RegCreateKeyEx will succeed.


 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
No rights on HKEY_Local_Machine registry map 'optionalcomponents' DutchRichard Windows Vista General Discussion 12 04-01-2010 11:33 PM
Re: Registry rights under Vista Pavel A. Windows Vista General Discussion 1 01-07-2009 02:14 PM
Re: Registry rights under Vista Zaphod Beeblebrox Windows Vista General Discussion 0 01-07-2009 01:23 PM
Re: Registry rights under Vista Tyro Windows Vista General Discussion 0 01-07-2009 02:46 AM
Registry Key Error - Insufficient Access Rights Kruncher_McNut Windows Vista Performance 0 11-14-2007 04:48 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59