Writing to Registry: How do I acquire the proper permissions?

Posted on 2003-02-25
Medium Priority
Last Modified: 2010-08-05
Application.UserAppDataRegistry.SetValue("name", "value");

This microsoft article says I nead proper permissions (read, write, create), but it gives no information on how those permissions are specified! :(


I need to know how to acquire proper permissions to use code such as the above.

Question by:clifgriffin
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

Volcano_88101 earned 140 total points
ID: 8022413
Below is an except from the page.
The Link posted is a link to RegisteryPermissionAccess Enumeration

Often times your Installer will create and set the permissions and sometimes the initial value of them

Your application will require Create and Write registry permissions to write to the registry and Read permission to read the registry. For more information working with registry keys, see the documentation for the GetValue and SetValue methods of the Microsoft.Win32.RegistryKey class and the System.Security.Permissions.RegistryPermissionAccess enumeration documentation in the .NET Framework SDK documentation.

LVL 48

Assisted Solution

AlexFM earned 140 total points
ID: 8023035
Don't care. You don't need to make anything to get these permissions. Microsoft mentioned possible reason of Registry operations failure. That means, if one of your customers tries to run the program from Guest account, Write Registry operation will fail.
The only thing you should do is to handle exception and give appropriate message to user.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question