1

Closed

Start with Windows

description

Add option to have Peepster start with windows.
 
Add a registry key to HKCU\Software\Microsoft\Windows\CurrentVersion\Run
 
RegistryKey rkApp = Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true);
 
// Check to see the current state (running at startup or not) on form load
if (rkApp.GetValue("MyApp") == null)
 chkRun.Checked = false; // The value doesn't exist, the application is not set to run at startup
else
chkRun.Checked = true; // The value exists, the application is set to run at startup
 
//When the form is closed via the OK button
if (chkRun.Checked)
rkApp.SetValue("MyApp", Application.ExecutablePath.ToString()); // Add the value in the registry so that the application runs at startup
else
rkApp.DeleteValue("MyApp", false); // Remove the value from the registry so that the application doesn't start
Closed Oct 22, 2009 at 3:41 AM by JaySmith

comments

wrote Oct 22, 2009 at 3:41 AM

Resolved with changeset 36518.

wrote Feb 12, 2013 at 11:47 PM

wrote May 14, 2013 at 11:03 PM