Windows registry access permission problem

P

Pe2per.Ro2nie

Hi,
I am trying to read the 'Protected Storage System Provider' sub keys
and it requires access permission. I would like to access this key
thorugh my program, how do I do this?

My code is

Dim RegKey as RegistryKey =
Registry.CurrentUser.OpenSubKey("Software\Microsoft\Protected Storage
System Provider\S-X-X-XX-XXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXX")

When I run it, the SecurityException prompts me the error saying
Requested registry access is not allowed. I have also tried with
RegistryPermission and it didn't work either.

How can I fix this? Please help.
Thank you.
 
V

Vadym Stetsyak

Hello, (e-mail address removed)!

One of the reasons why access is denied is access control lists ( ACLs ) and
your account that is not in them.

Under what account are you accessing registry?

To access restricted keys you can impersonate with an account who has
permissions
( e.g Administrators )

You wrote on 13 Dec 2006 12:00:26 -0800:

PR> My code is

PR> Dim RegKey as RegistryKey =
PR> Registry.CurrentUser.OpenSubKey("Software\Microsoft\Protected Storage
PR> System Provider\S-X-X-XX-XXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXX")

PR> When I run it, the SecurityException prompts me the error saying
PR> Requested registry access is not allowed. I have also tried with
PR> RegistryPermission and it didn't work either.


With best regards, Vadym Stetsyak. E-mail: (e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top