run at startup

Hello,

how can i add my app to the windows startup programs could anyone explain it to me

thnx a lot




Answer this question

run at startup

  • CamCam

    The easiest way to do it is to add a registry key to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run or HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run that names both your application and the path and arguments for your app.

    Take a look at this Code Project article on working with the registry to make it work.



  • Tailwag

    thnx a lot, but i have already solved this... although i also used registry keys... :)

    the codesample is here:

    Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run\", True).SetValue("MyApp", My.Application.Info.DirectoryPath & "\myapp.exe")



  • run at startup