public static void BackupAndRemove(string[] servicesToRemove, IUserInterface ui)
        {
            var serviceRemover = new ServiceRemover(servicesToRemove, ui);

            string[] actualBackuppedServices = serviceRemover.PerformBackup();
            serviceRemover.PerformRemoval(actualBackuppedServices);
        }
Exemple #2
0
        public static void BackupAndRemove(string[] servicesToRemove,
                                           IUserInterface ui,
                                           ServiceRemovalMode removalMode = ServiceRemovalMode.ServiceControl)
        {
            var serviceRemover = new ServiceRemover(servicesToRemove, ui);

            string[] actualBackuppedServices = serviceRemover.PerformBackup();
            serviceRemover.PerformRemoval(actualBackuppedServices, removalMode);
        }
Exemple #3
0
        public void Run()
        {
            ui.PrintHeading("Backing up services...");
            string[] actualBackuppedServices = serviceRemover.PerformBackup(servicesToRemove);

            if (actualBackuppedServices.Length > 0)
            {
                ui.PrintHeading("Removing services...");
                serviceRemover.PerformRemoval(actualBackuppedServices);
            }
        }
Exemple #4
0
        private void RemoveTelemetryServices()
        {
            ui.PrintHeading("Backing up and removing telemetry services...");
            serviceRemover.BackupAndRemove(telemetryServices);
            if (serviceRemover.IsRebootRecommended)
            {
                IsRebootRecommended = true;
            }

            string[] actualProtectedServices = serviceRemover.PerformBackup(protectedTelemetryServices);
            RemoveProtectedServices(actualProtectedServices);
        }
Exemple #5
0
        private void RemoveTelemetryServices()
        {
            ui.PrintHeading("备份和删除微软远程接收系统测试数据服务...");
            serviceRemover.BackupAndRemove(telemetryServices);
            if (serviceRemover.IsRebootRecommended)
            {
                IsRebootRecommended = true;
            }

            string[] actualProtectedServices = serviceRemover.PerformBackup(protectedTelemetryServices);
            RemoveProtectedServices(actualProtectedServices);
        }