How to Startup your application with Windows
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 'System & API - How to Startup your application with Windows Sub Method1() 'Need to set the Windows Script Host Object Model (/system32/wshom.ocx) 'reference for this to function. Dim Wsh_Shell As New WshShell Set Wsh_Shell = CreateObject("WScript.Shell") Wsh_Shell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\YOUR_APP_NAME", _ App.Path & "\" & App.EXEName & ".exe" End Sub Sub Method2() 'Place a sortcut to the file in, 'C:\Windows\Start Menu\Programs\Startup '//Windows 9X 'C:\Documents and Settings\<CurrentUserName>\Start Menu\Programs\Startup '//Windows 2K/XP/2003 Server End Sub Sub Method3() 'Place the Path/FileName in a "STRING VALUE" key in the following location in the registry. 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run End Sub |
January 29th, 2009 - 09:10
This code snipit really helped me.