Kayıt defteri anahtarına değer girmeyi denediğimde NullReference Exception alıyorum. Aşağıda benim kodum. Nedenini bilen var mı? yerine OpenSubKey aitKayıt Defteri Değeri ayarlandığında NullReferenceException
using System;
using Microsoft.Win32;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
RegistryKey myKey = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\Current Version\\Policies\\System", true);
myKey.SetValue("DisableTaskMgr", 0, RegistryValueKind.DWord);
}
}
}
Üzgünüm, metni almadım. Bu hatayı alıyorum ve nedenini bulmakta zorlanıyorum. Unutmayın yeni için C# –
Hata için bir satır numarası var mı? – Suroot