How do I set a program to launch at startup

Thanks to everyone for responding so fast.
Joel, I used your option 2 and added a registry key to the “Run” folder of the current user.
Here’s the code I used for anyone else who’s interested.

    using Microsoft.Win32;
    private void SetStartup()
    {
        RegistryKey rk = Registry.CurrentUser.OpenSubKey
            ("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);

        if (chkStartUp.Checked)
            rk.SetValue(AppName, Application.ExecutablePath);
        else
            rk.DeleteValue(AppName,false);            

    }

Leave a Comment