I have a small application with a CheckBox
option that the user can set if they want the app to start with Windows.
My question is how do I actually set the app to run at startup.
ps: I'm using C# with .NET 2.0.
Click the Windows logo at the bottom left of your screen, or press the Windows key on your keyboard. Then search and select "Startup Apps." 2. Windows will sort the applications that open on startup by their impact on memory or CPU usage.
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); }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With