Hi I am using following code to add my application to StartUp of Windows. It works well in XP but gives error in Vista that you donot have permission to edit registty file.
Private Sub Forceps_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Dim regStartUp As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
'Dim value As String
'value = regStartUp.GetValue("Myapp")
'If value <> Application.ExecutablePath.ToString() Then
'regStartUp.CreateSubKey("Myapp")
'regStartUp.SetValue("Myapp", Application.ExecutablePath.ToString())
' End If
End Sub