Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Visual Basic 2008 Tutorial - How to make your VB programs startup automatically when windows starts

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
17,609
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jun 8, 2009

How to make the programs you create in Visual Basic 2008 start up when windows does (the complete code is below)
My email: sam@salmonator.com
My website: www.salmonator.com

Code:

Imports System.IO
Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim FileName As String Dim FilePath As Object Dim RegistryKey As Object FileName = "StartupTutorial.exe" FilePath = Path.GetFullPath(FileName) RegistryKey = CreateObject("WScript.Shell") RegistryKey.RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersi­on\Run\StartupTutorial", FilePath) End Sub
End Class

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 2 dislikes

Link to this comment:

Share to:

Uploader Comments (wwwsalmonatorcom)

  • Well.. i writed Nice but when i debug it it "mark" the HKEY line with yellow coulor..

    and says that ther an error..

    WTF

  • Hover over the highlighted lie, and does it say anything like the type of error?

  • if i write a little piece of your code wrong will it then cause a total system breakdown?

  • Nope. More than likely it just won't work, but it won't break anything.

Top Comments

  • If you get an error on HKEY code all you gottta do is save the project and go to the .EXE file and right click > run as adminstartor!

see all

All Comments (73)

Sign In or Sign Up now to post a comment!
  • just wondering does this work in 2010?

  • AUSSIIIEEE!!! =D

    

  • YOU are a right but what happening for the STARTUP to strat up with windows run add a timer and add this following code ()private sub Form_load ()timer1.start End Sub and ()Private sub Timer1_tick ("{SendKeys.Send("{BACKSPACE End Sub
  • all blind...

    \CurrentVersi­-on\Run

    to

    \CurrentVersi­on\Run

  • I send you an email.

  • Key is in the registry, but in doesn't start up!

  • it doesnt works

  • it doesnt show up in the RUN reg folder

  • @eyeballs97 did u copy and past every code?

    or typ it over?

    I RECOMMEND TO TYP IT OVER!

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more