【C#】 开机启动/取消开机启动
1、开机启动
using Microsoft.Win32; RegistryKey runKey = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"); runKey.SetValue("Check", "\"" +Application.ExecutablePath + "\""); runKey.Close();
2、取消开机启动
RegistryKey runKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",true); runKey.DeleteValue("Check"); runKey.Close();

浙公网安备 33010602011771号