Feedback

Autostarteintrag schreiben

Sprache: VB

Simple Einschreibung in die Registry um ein beliebiges Programm nach einem PC-Neustart wieder aufzurufen.
Imports Microsoft.Win32

Private Sub schreibeinautostart(ByVal programmname As String, ByVal pfadzuexe As String)
        Try
            Registry.SetValue("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRun", programmname, pfadzuexe, RegistryValueKind.String)
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler")
        End Try
    End Sub
Imports Microsoft.Win32

Private Sub schreibeinautostart(ByVal programmname As String, ByVal pfadzuexe As String)
        Try
            Registry.SetValue("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRun", programmname, pfadzuexe, RegistryValueKind.String)
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler")
        End Try
    End Sub