Breaking Sec

Full Version: [vb.net] add to startup
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
use like

Code:
startup()

Code:
Public Sub startup()
        Dim RegistryKey As Object
        Try
            RegistryKey = CreateObject("WScript.Shell")
            RegistryKey.RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Startme", Application.ExecutablePath)
        Catch ex As Exception
          msgbox("error can't add to startup")
        End Try
    End Sub
Reference URL's