Working with Windows Registry in C#
(Page 1 of 5 )
The Windows registry is the place where Microsoft Windows operating systems store settings and options. During your past endeavors as a programmer, I am sure you ran into numerous situations where working with registry was either necessary or just helpful. In this article, we are going to learn how to accomplish this task in C#.
C# is the simple, modern, general-purpose, and object-oriented programming language developed by Microsoft. Thanks to C#, working with registry is an easy task once you know the basics. First, we will present the structure of the registry in order to refresh our memories. Then we will move on to learning the strategy required to work with it.
Therefore, you can expect to read about how to read, write, and delete specific keys (subkeys) and values. The techniques will be accompanied with appropriate code samples for the purpose of exemplification. We are going to approach this task using the Microsoft.Win32 namespace because it contains the powerful Win32_Registry WMI class (Windows Management Instrumentation - link for Wikipedia entry on WMI), which represents the Windows registry.
I know you are already anxiously waiting to begin, so here we go now!
Next: The Basics >>
More C# Articles
More By Barzan "Tony" Antal