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

            string[] actualBackuppedServices = serviceRemover.PerformBackup();
            serviceRemover.PerformRemoval(actualBackuppedServices);
        }
Esempio n. 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);
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
        }
Esempio n. 5
0
        private void RemoveTelemetryServices()
        {
            ui.PrintHeading("备份和删除微软远程接收系统测试数据服务...");
            serviceRemover.BackupAndRemove(telemetryServices);
            if (serviceRemover.IsRebootRecommended)
            {
                IsRebootRecommended = true;
            }

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