Post: C# Reading and Writing Registry Keys
08-05-2013, 06:00 AM #1
Default Avatar
Oneup
Guest
(adsbygoogle = window.adsbygoogle || []).push({}); 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.

    
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");


}


You must login or register to view this content.

You must login or register to view this content.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo