Click to See Complete Forum and Search --> : Determining Permission of Registry Key


Pizzor2000
March 29th, 2010, 06:18 PM
How would I determine if the currently logged-in user has permissions to write to a registry key?

For example, I am writing an applet that allows the user to change the registered owner and organization for Windows. Since this is a system-wide setting, only administrators can change it.

What I would like to do is determine if the current user has write permissions on these registry entries, so if they don't, the program would gray out the text boxes where they enter these values.

Paul McKenzie
March 30th, 2010, 01:50 AM
http://msdn.microsoft.com/en-us/library/aa375769(VS.85).aspx

Regards,

Paul McKenzie

Pizzor2000
April 6th, 2010, 09:33 AM
Thanks for the link. While going through it, I did run across the RegGetKeySecurity function. Is this what I would want to use?