[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

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

Posted on 2003-02-25
4
Medium Priority
?
247 Views
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! :(

http://msdn.microsoft.com/library/en-us/dndotnet/html/persistappsettnet.asp

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

Thanks,
Clif
0
Comment
Question by:clifgriffin
2 Comments
 

Accepted Solution

by:
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.

http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemSecurityPermissionsRegistryPermissionAccessClassTopic.asp
0
 
LVL 48

Assisted Solution

by:AlexFM
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.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
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…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses
Course of the Month11 days, 12 hours left to enroll

640 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