Tutoriel [VB.NET] Source - Lancement au Démarrage

Kilo-25

Premium™
Premium™
28/4/17
75
57
618
#1
Code:
Public Shared Sub AddToStartup(ByVal name As String, ByVal path As String)
        Try
            Dim Reg As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser
            Dim K As Microsoft.Win32.RegistryKey = Reg.OpenSubKey("software\microsoft\windows\currentversion\run", True)
            K.SetValue(name, path, Microsoft.Win32.RegistryValueKind.String)
        Catch
   End Try
End Sub
 
J'aime: RoRoH_AR
R

RoRoH_AR

Visiteur
Visiteur
#2
Code:
Public Shared Sub AddToStartup(ByVal name As String, ByVal path As String)
        Try
            Dim Reg As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser
            Dim K As Microsoft.Win32.RegistryKey = Reg.OpenSubKey("software\microsoft\windows\currentversion\run", True)
            K.SetValue(name, path, Microsoft.Win32.RegistryValueKind.String)
        Catch
   End Try
End Sub
:bien: