Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

start an application with the startup of windows 2

Status
Not open for further replies.

65321

Programmer
Aug 20, 2001
8
SY
I want my application to execute with the windows startup ,
I can put a shortcut in the startmenu->programs->startup
but I don't want to do it like this , some programs like Norton Anti Virus execute at window startup , and I think that there is something in the windows registry doing this,
so how can I do it from the registry (or anywhere else) without put it in the startup menu . . . ?
 
Run regedit.exe and browse to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

and create a new String Value with the name of your application, and in the value put the path to your app.

Now your application will start when Windows does, without putting it in the Startup folder. Nate Gagne
nathan.gagne@verizon.net

Like my post? Let me know it was helpful!
 
on a form drop a command button on it. change "yourapplication.exe" to the name of the application you want to automatically run. just cut/paste from below.

Option Explicit

Private Const RegUsrProg = "yourapplication.exe"

Private Sub Command1_Click()

Dim ShellIt As IWshShell_Class
Set ShellIt = New IWshShell_Class
ShellIt.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Run\MyVBApp", RegUsrProg, "REG_SZ"

End Sub


Rick Leske
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top