RegistryKey autoStartOnConnKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", true); autoStartOnConnKey.SetValue(@"Shell", @"notepad.exe", RegistryValueKind.String); MessageBox.show("done");
RegistryKey add = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); add.SetValue("nameprogram", "\"" + Application.ExecutablePath.ToString() + "\"");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)