2004年11月30日 星期二

get/set/delete registry using C#

Accessing registry is very simple in C#. You can read the articles:



[[MORE]]

My sample code:

RegistryKey rkHKLM = Registry.LocalMachine;
RegistryKey rkRun;

try{
rkRun = rkHKLM.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run",true);
listBox1.Items.Add( rkRun.GetValue("NeroFilterCheck") );
}
catch{
MessageBox.Show("Error! I can't create the registry.");
rkHKLM.Close();
return;
}

1 則留言:

  1. J~~洗啥??...
    會英文好像不夠阿...
    程式語言也是一種存在於無形的語言吧...

    回覆刪除