[C#.net] Auto Run via Registry
using Microsoft.Win32;
RegistryKey regKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true);
if (regKey.GetValue("Testing") == null)
{
regKey.SetValue("Testing", Application.ExecutablePath.ToString());
}You can change the code to delete the value to get it out of the registry.
using Microsoft.Win32;
RegistryKey regDel = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true);
regDel.DeleteValue("Testing");
regDel.Close();You can change the "Testing" to make it your own key name. Simple and easy.