Requested registry access is not allowed

M

Mobile Boy

We have a Windows application that is writing its configuration settings to
the windows registry.

On my development pc (Windows 7 - dot net 4.5) everything is working fine.

On a test target machine (Windows 8 - dot net 4.5), I get the following
error on the command "Registry.LocalMachine.OpenSubKey"


"Requested registry access is not allowed"


?

That is an obvious error description, however.


Running the application as Administrator is solving the problem.

Running the application as a user from the administrators group does not
solve the problem.


I have 2 questions (the second question is the most important since we need
to build an automatic installer (setup project in Visual Studio).



1.. What is the right way to resolve the above error manually?


2.. What is the right way to make a VS2012 Setup giving the packaged
assembly the rights to read and write settings in the registry?
(It's an evidence that we are not happy with a solution where the end user
must edit user rights or must edit the registry manually to resolve the
above error. The setup must run an install a ready to use application)

Any help would be greatly appreciated.

Best regards
Mobile Boy


?

?

?

?
 
Joined
Oct 7, 2013
Messages
1
Reaction score
0
We have a Windows application that is writing its configuration settings to
the windows registry.

On my development pc (Windows 7 - dot net 4.5) everything is working fine.

On a test target machine (Windows 8 - dot net 4.5), I get the following
error on the command "Registry.LocalMachine.OpenSubKey"


"Requested registry access is not allowed"


?

That is an obvious error description, however.


Running the application as Administrator is solving the problem.

Running the application as a user from the administrators group does not
solve the problem.


I have 2 questions (the second question is the most important since we need
to build an automatic installer (setup project in Visual Studio).



1.. What is the right way to resolve the above error manually?


2.. What is the right way to make a VS2012 Setup giving the packaged
assembly the rights to read and write settings in the registry?
(It's an evidence that we are not happy with a solution where the end user
must edit user rights or must edit the registry manually to resolve the
above error. The setup must run an install a ready to use application)

Any help would be greatly appreciated.

Best regards
Mobile Boy


?

?

?

?

Hi there

Did you come up with an answer to your problem?
 

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