views:

283

answers:

1

I'm traversing the registry on Windows 7 from C#. When opening certain subkeys, I get a SecurityException:

Requested registry access is not allowed.

An example is "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer".

I've searched similar questions and found suggestions to run Visual Studio with Administrator privileges. I tried that and also tried running the build as Administrator, but I still get SecurityExceptions.

Is there a way to get full access to the registry from C#?

A: 

You need to use runas, for reaources I suggest you to take a look at Wikipedia

Nathan Campos