Beispiel #1
0
        private static void RunRemove()
        {
            if (!PermissionCheck.IsRunAsAdmin)
            {
                MessageBox.Show("This option requires administrator privileges.", "Remove", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (!TaskScheduler.IsInstalled())
            {
                return;
            }

            if (!TaskScheduler.Delete())
            {
                MessageBox.Show("Unregistration failed, Task possibly not completely removed.", "Remove", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }