Blue Theme Orange Theme Green Theme Red Theme
 
Nevron Chart
Home | Forums | Videos | Advertise | Certifications | Downloads | Blogs | Interviews | Jobs | Beginners | Training
 | Consulting  
Submit an Article Submit a Blog 
 Jump to
Skip Navigation Links
TechnologyExpand Technology
WebsiteExpand Website
DevExpress UI Controls
Search :       Advanced Search »
Home » Learn .NET » Working With Windows Registry Using C# (Part 1: Windows Registry Basics)

Working With Windows Registry Using C# (Part 1: Windows Registry Basics)

Article teaches basic Fundamental of Windows Registry by GUI and also With coding.

Author Rank :
Page Views : 3126
Downloads : 0
Rating :
 Rate it
Level : Advanced
   Print Read/Post comments Post a comment  Similar Articles  
   Email to a friend  Bookmark  Author's other articles  
 
Nevron Chart
Become a Sponsor
 Tag Cloud
 Latest Jobs
More ... 
 Latest Interview Questions
More ... 


In this article I will teach you about how to work with windows registry by windows GUI as this is First article of this series i will teach you basic here that we can manipulate registry normally in windows .In second part of article we will do all the operation we performed here manually we will do it programatically using C#.


What is registry?

 

Registry is place where windows stores its own configuration .like you click some options for task bar "auto hide" etc that all are stored in registry. When windows load again it knows what where the configurations of particular dialog box from the Registry.

 

You can access registry by Start>>Run>>regedit "Hit Enter"

You will see some screen like below


image1.gif


Main parts of Registry to work with

 

Here you can see Current User, Local Machine Users etc part of it .For us important one are Current User and Local Machine .All the settings for current login are stored into HKEY_CURRENT_USER that settings are applicable to only current user Settings that are applicable to the entire user Accounts on machine are stored into HKEY_LOCAL MACHINE.

 

How Registry help us in our software?

 

Registry is place where we can store settings for our application .we can also use XML file to store settings about our application .but when some data you want to store about application that need to be checked every time user opens application and you don't want user to know from where its loading settings best place to store this type of settings into registry .For example MS Office package store its serial Number of Product Activation in Registry.

 

Operations on Registry 


Operation
What it does
Creating Subkey
means Creating Folder in Registry
Opening Subkey
means to Open Folder for Modifying values inside it
Delete Subkey
Delete Folder in registry

now lets get clear Idea what is Opening/Creating Subkey ?

for modifying values(settings of some application in Registry) we need to programatically open the SubKey(Folder) od registry is called Opening Subkey.

We need to create Directory inside windows registry so that we can place settings for our custom application and we do create new registry Subkey for that because we don't want to mess other setting around in registry so we make separate directory for our own settings.

as soon as we don't need registry when we uninstall our application our setup should automatically delete all the registry settings it created without affecting other SubKeys inside registry we use Delete SubKey Operation

So now you have Some Basic Idea About registry how it works .

8-17-2010 12-36-34 PM.gif

[Creating Subkey In Windows Registry ]

8-17-2010 12-38-41 PM.gif
[Delete SubKey in Windows Registry ]

same way you can also work with values too inside the subkeys .like delete /create New values etc

so you have learnt how to manipulate registry of windows manually
Continue ... .
In second part of article we will do all the operation we performed here manually we will do it programatically using C#.

Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post Here.
Login to add your contents and source code to this article
 [Top] Rate this article
 
 About the author
 
Kirtan Patel
He completed his Bachelor of Computer Application from Gujarat University 2009 .He is doing Master of Computer Application from Gujarat Technological University right now .. His area of Interests are Web Hacking , C# .net Windows form ,asp.net , WPF ,Silverlight ,SQL Server and Some PHP & My SQL.
MY BLOG (www.codeindex.blogspot.com) | MY SITE

Looking for C# Consulting?
C# Consulting is founded in 2002 by the founders of C# Corner. Unlike a traditional consulting company, our consultants are well-known experts in .NET and many of them are MVPs, authors, and trainers. We specialize in Microsoft .NET development and utilize Agile Development and Extreme Programming practices to provide fast pace quick turnaround results. Our software development model is a mix of Agile Development, traditional SDLC, and Waterfall models.
Click here to learn more about C# Consulting.
 
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
Discover the Top 5 .NET Memory Management Fundamentals
To write the best .NET code, you need to know exactly how the .NET framework really manages memory. Ricky Leeks presents the Top 5 fundamental facts of .NET memory management. Learn more.
Nevron Chart for .NET 2010.1 Now Available
The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
ASP.NET 4 Hosting
Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites – Click Here!
 
 Post a Feedback, Comment, or Question about this article
Subject:
Comment:
Team Foundation Server Hosting
Become a Sponsor
 Comments
Nevron Chart
 © 2012  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.