那还不容易!using system .microsoft.win32;//一定要引用RegistryKey rk = Registry.LocalMachine;RegistryKey rk2 = rk.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run"); rk2.SetValue( "autorun",这写程序路径);rk2.Close();rk.Close();