RegistryKey rkApp = Registry.CurrentUser.OpenSubKey(“SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run”, true);

string name = “Messanger”;  // name of the program
string pro = “C:\messanger.exe”; // program location

rkApp.SetValue(name, pro);

Advertisements