public static bool uninstall() { if (StartUpManager.IsUserAdministrator()) { StartUpManager.RemoveApplicationFromAllUserStartup(); return(true); } else { return(false); } }
public static bool install() { if (StartUpManager.IsUserAdministrator()) { StartUpManager.AddApplicationToAllUserStartup(); return(true); } else { //MessageBox.Show(); return(false); } }