Try Dim regKey As RegistryKey regKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True) If MyAppsCheckBox.Checked = true Then regKey.SetValue("MyApp", Application.ExecutablePath.ToString()) Else regKey.DeleteValue("MyApp", True) End If regKey.Close() Catch ex As Exception msgbox(ex.Message) End Try
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)