... ma per avviare automaticamente non è affatto necessario ricorrere ad un file .bat!
codice:
Dim key As Object = Nothing
key = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", Application.ProductName, Nothing)
If key Is Nothing Then
My.Computer.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", _
True).SetValue(Application.ProductName, Application.ExecutablePath)
End If
Per scrivere in "CurrentUser" non occorrono permessi di amministratore. Con una check box puoi decidere di cancellare il valore (Delete Value) o riscriverlo a piacere.