Click here to Skip to main content
11,576,667 members (59,048 online)
Click here to Skip to main content

Tagged as

Read Registry using C#

, 8 Dec 2011 CPOL 15.2K 1
You can try the function below to read values from the Registry:myRegistry.Read("MY_KEY");where: input: the key name (string)output: the value of the key (string)using System;using Microsoft.Win32; public string Read(string KeyName){ // Opening the registry key ...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

7 Dec 2011
morningstar1710
This is the code that I use:For lookup:RegistryKey rkn = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Test");dwResult = rkn.GetValue("Preferences");For update:RegistryKey rkn = Registry.LocalMachine.CreateSubKey(szKeyPath); dwResult = rkn.ValueCount;rkn.SetValue(szKey,...
5 Dec 2011
Denno.Secqtinstien
2 alternatives  
How to read a key from the Windows Registry.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

RaviRanjankr
Software Developer
India India
Microsoft Student Partner | CS Student | MCTS | CP MVP | Crazy Learner | Dreamer

An Indian, who loves his country, believes in freedom, He is an enthusiast Techie and crazy learner. He is passionate about Technologies and social media. He holds bachelor degree of CS in Information Technology and now pursuing Master degree in Computer Application.

He always excited and keen Interested in learning and sharing knowledge. He loves to write blog, learn new things, listen music, taking arts and Playing Games..

He keep himself on the desk of his imagination, hanging around with some inceptions.

| | Privacy | Terms of Use | Mobile
Web03 | 2.8.150603.1 | Last Updated 8 Dec 2011
Article Copyright 2011 by RaviRanjankr
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid