private void disableToolStripMenuItem_Click(object sender, EventArgs e) { if (StartUpManager.IsUserAdministrator()) { // Will Remove application to All Users StartUp StartUpManager.RemoveApplicationFromAllUserStartup(); } else { // Will Remove application to Current Users StartUp StartUpManager.RemoveApplicationFromCurrentUserStartup(); } }
private void enableToolStripMenuItem_Click(object sender, EventArgs e) { if (StartUpManager.IsUserAdministrator()) { // Will Add application to All Users StartUp StartUpManager.AddApplicationToAllUserStartup(); } else { // Will Add application to Current Users StartUp StartUpManager.AddApplicationToCurrentUserStartup(); } }