Imports Microsoft.Win32 Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load txtPath.Text = Application.ExecutablePath.ToString End Sub Private Sub btnWrite_Click(sender As Object, e As EventArgs) Handles btnWrite.Click Try Dim regStartUp As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run", True) Dim value As String = regStartUp.GetValue(IO.Path.GetFileNameWithoutExtension(txtPath.Text)) If value <> Application.ExecutablePath.ToString() Then regStartUp.SetValue(IO.Path.GetFileNameWithoutExtension(txtPath.Text), txtPath.Text) End If MsgBox("Write Complete!") Catch ex As Exception MsgBox(ex.ToString) End Try End Sub End Class