Witam mam problem bo program się kompiluje bez problemu a nie dodaje wpisu w Rejestrze.
Nie wiem czego to jest wina może Visual Studio 2010 a może Win 7 64 bit albo jakiś błąd w kodzie.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;
namespace RegeditTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
try
{
RegistryKey Rejestr = Registry.LocalMachine.CreateSubKey("SOFTWARE\\ADIENCJA\\Program");
Rejestr.SetValue("wersja", "1.0");
Rejestr.Close();
}
catch { }
}
private void button2_Click(object sender, EventArgs e)
{
try
{
/* RegistryKey Usun =*/ Registry.LocalMachine.DeleteSubKey("SOFTWARE\\ADIENCJA\\Program");
// Usun.Close();
}
catch { }
}
}
}