ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 3726

C# Reading and Writing Registry Keys

by 1UP - 10-10-2016 - 11:37 PM
#1
Starting to port most of my code over from my VB projects and figured some people might find some of this useful.
These aren't guides and I'm not really going to explain anything (The vb versions do that and I will link those here)
Source code is included in a link below.

Code:
using Microsoft.Win32;
       private void btn_read_Click(object sender, EventArgs e)
       {

           string InstallPath = (string)Registry.GetValue(@"HKEY_CURRENT_USER\Software\Skype\Phone", "SkypePath", null);
          lbl_Key.Text  = InstallPath;
       }

       private void btn_write_Click(object sender, EventArgs e)
       {
           Registry.SetValue(@"HKEY_CURRENT_USER\Software\Skype\Phone", "SkypePath", "Test");


       }

Source Code
Reply
#2
Thank you for sharing the code man. Heart
Are you a guest to this site? Click the image below and sign up today!
[Image: FTYbRmR.gif]
Reply

Users browsing: 2 Guest(s)