Example #1
0
 private void Unchecked(object sender, RoutedEventArgs e)
 {
     if (StartUpManager.IsUserAdministrator())
     {
         // Will Remove application to All Users StartUp
         StartUpManager.RemoveApplicationFromAllUserStartup();
     }
     else
     {
         // Will Remove application to Current Users StartUp
         StartUpManager.RemoveApplicationFromCurrentUserStartup();
     }
     Properties.Settings.Default.starts_with_windows = false;
     Properties.Settings.Default.Save();
 }
Example #2
0
 private void Checked(object sender, RoutedEventArgs e)
 {
     if (StartUpManager.IsUserAdministrator())
     {
         // Will Add application to All Users StartUp
         StartUpManager.AddApplicationToAllUserStartup();
     }
     else
     {
         // Will Add application to Current Users StartUp
         StartUpManager.AddApplicationToCurrentUserStartup();
     }
     Properties.Settings.Default.starts_with_windows = true;
     Properties.Settings.Default.Save();
 }