You can set a program at startup like that:
private void SetStartup()
{
RegistryKey rk = Registry.CurrentUser.OpenSubKey
("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
rk.SetValue("Notepad", "c:\windows\notepad.exe");
}
Now if you want to remove it then just edit the path slightly.
rk.SetValue("Notepad", "c:\windows\notepad.exe_");
Later on if you want to reset it, just remove the underscore.
4
solved Disable startup program in registry; [closed]