Solved

reading registry using c#?

Posted on 2012-03-20
2
479 Views
Last Modified: 2012-03-25
Hi,

I have a question about reading the registry from my .net desktop application.

I am trying to read the registry entries using c# from my application.
I understand this operation requires the admin permission.

My question is when I install some software like Word or Photoshop.
Every time they load, they access the registry to read info like when was last time it was opened or etc.

How does those application read the registry without the admin permission?

Can you explain?
0
Comment
Question by:dkim18
2 Comments
 
LVL 20

Accepted Solution

by:
BuggyCoder earned 350 total points
ID: 37742208
No You Don't need any admin rights to read the registry...
However, if you need to manipulate registry entries, you do need admin rights

Given below is the link that helps you with the code to work with registry in c#:-

http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_27638295.html#a37737669
0
 
LVL 44

Assisted Solution

by:AndyAinscow
AndyAinscow earned 150 total points
ID: 37742259
Typically reading values is without problem.
Writing, however, can but not necessarily does require admin permissions.  Writing to the current user hive should be fine.  Writing to the local machine hive however almost certainly will require admin permission.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …

856 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