Click here to Skip to main content
14,636,898 members
Rate this:
Please Sign up or sign in to vote.
See more:
I have made a project which creates registry on first time run, and checks the value of the key on later run.

but on the first run it give an error registry edit access denied
Zoltán Zörgő 26-Jun-13 3:03am
Check access rights first! What is the key you want to create, and what is the user access level context?
Rate this:
Please Sign up or sign in to vote.

Solution 2

Don't use the registry! Access to the registry has been restricted since it was first introduced, and the restrictions are likely to get more heavy duty rather than less - due to programs overusing it, and security concerns in the same way that it is harder and harder to store your data files and config info in the application installation folder.

Instead store a file in a sensible place that you will have access to. This can help: Where should I store my data?[^]
Kashif Alvi 26-Jun-13 3:18am
Thank You so much for your suggestion i will look forward to store data in an .ini file.
OriginalGriff 26-Jun-13 3:43am
You're welcome!
Rate this:
Please Sign up or sign in to vote.

Solution 1

It seems that you do not have sufficient permission for making changes in registry. Try to run this in administrative mode.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100