Exemplo n.º 1
0
        // silent config processing for Windows 10 tweaks
        internal static void ProcessSilentConfigWindows10()
        {
            if (CurrentSilentConfig.EnableLegacyVolumeSlider.HasValue)
            {
                if (CurrentSilentConfig.EnableLegacyVolumeSlider.Value)
                {
                    Optimize.EnableLegacyVolumeSlider();
                }
                else
                {
                    Optimize.DisableLegacyVolumeSlider();
                }
            }

            if (CurrentSilentConfig.EnableTaskbarColor.HasValue)
            {
                if (CurrentSilentConfig.EnableTaskbarColor.Value)
                {
                    Optimize.EnableTaskbarColor();
                }
                else
                {
                    Optimize.DisableTaskbarColor();
                }
            }

            if (CurrentSilentConfig.DisableQuickAccessHistory.HasValue)
            {
                if (CurrentSilentConfig.DisableQuickAccessHistory.Value)
                {
                    Optimize.DisableQuickAccessHistory();
                }
                else
                {
                    Optimize.EnableQuickAccessHistory();
                }
            }

            if (CurrentSilentConfig.DisableStartMenuAds.HasValue)
            {
                if (CurrentSilentConfig.DisableStartMenuAds.Value)
                {
                    Optimize.DisableStartMenuAds();
                }
                else
                {
                    Optimize.EnableStartMenuAds();
                }
            }

            if (CurrentSilentConfig.EnableDarkTheme.HasValue)
            {
                if (CurrentSilentConfig.EnableDarkTheme.Value)
                {
                    Optimize.EnableDarkTheme();
                }
                else
                {
                    Optimize.EnableLightTheme();
                }
            }

            if (CurrentSilentConfig.UninstallOneDrive.HasValue)
            {
                if (CurrentSilentConfig.UninstallOneDrive.Value)
                {
                    Task t = new Task(() => Optimize.UninstallOneDrive());
                    t.Start();
                }
                else
                {
                    Task t = new Task(() => Optimize.InstallOneDrive());
                    t.Start();
                }
            }

            if (CurrentSilentConfig.DisableMyPeople.HasValue)
            {
                if (CurrentSilentConfig.DisableMyPeople.Value)
                {
                    Optimize.DisableMyPeople();
                }
                else
                {
                    Optimize.EnableMyPeople();
                }
            }

            if (CurrentSilentConfig.EnableLongPaths.HasValue)
            {
                if (CurrentSilentConfig.EnableLongPaths.Value)
                {
                    Optimize.EnableLongPaths();
                }
                else
                {
                    Optimize.DisableLongPaths();
                }
            }

            if (CurrentSilentConfig.DisableAutomaticUpdates.HasValue)
            {
                if (CurrentSilentConfig.DisableAutomaticUpdates.Value)
                {
                    Optimize.DisableAutomaticUpdates();
                }
                else
                {
                    Optimize.EnableAutomaticUpdates();
                }
            }

            if (CurrentSilentConfig.ExcludeDrivers.HasValue)
            {
                if (CurrentSilentConfig.ExcludeDrivers.Value)
                {
                    Optimize.ExcludeDrivers();
                }
                else
                {
                    Optimize.IncludeDrivers();
                }
            }

            if (CurrentSilentConfig.DisableTelemetryServices.HasValue)
            {
                if (CurrentSilentConfig.DisableTelemetryServices.Value)
                {
                    Optimize.DisableTelemetryServices();
                }
                else
                {
                    Optimize.EnableTelemetryServices();
                }
            }

            if (CurrentSilentConfig.DisablePrivacyOptions.HasValue)
            {
                if (CurrentSilentConfig.DisablePrivacyOptions.Value)
                {
                    Optimize.DisablePrivacyOptions();
                }
                else
                {
                    Optimize.EnablePrivacyOptions();
                }
            }

            if (CurrentSilentConfig.DisableCortana.HasValue)
            {
                if (CurrentSilentConfig.DisableCortana.Value)
                {
                    Optimize.DisableCortana();
                }
                else
                {
                    Optimize.EnableCortana();
                }
            }

            if (CurrentSilentConfig.DisableSensorServices.HasValue)
            {
                if (CurrentSilentConfig.DisableSensorServices.Value)
                {
                    Optimize.DisableSensorServices();
                }
                else
                {
                    Optimize.EnableSensorServices();
                }
            }

            if (CurrentSilentConfig.DisableWindowsInk.HasValue)
            {
                if (CurrentSilentConfig.DisableWindowsInk.Value)
                {
                    Optimize.DisableWindowsInk();
                }
                else
                {
                    Optimize.EnableWindowsInk();
                }
            }

            if (CurrentSilentConfig.DisableSpellingTyping.HasValue)
            {
                if (CurrentSilentConfig.DisableSpellingTyping.Value)
                {
                    Optimize.DisableSpellingAndTypingFeatures();
                }
                else
                {
                    Optimize.EnableSpellingAndTypingFeatures();
                }
            }

            if (CurrentSilentConfig.DisableXboxLive.HasValue)
            {
                if (CurrentSilentConfig.DisableXboxLive.Value)
                {
                    Optimize.DisableXboxLive();
                }
                else
                {
                    Optimize.EnableXboxLive();
                }
            }

            if (CurrentSilentConfig.DisableGameBar.HasValue)
            {
                if (CurrentSilentConfig.DisableGameBar.Value)
                {
                    Optimize.DisableGameBar();
                }
                else
                {
                    Optimize.EnableGameBar();
                }
            }

            if (CurrentSilentConfig.DisableInsiderService.HasValue)
            {
                if (CurrentSilentConfig.DisableInsiderService.Value)
                {
                    Optimize.DisableInsiderService();
                }
                else
                {
                    Optimize.EnableInsiderService();
                }
            }

            if (CurrentSilentConfig.DisableFeatureUpdates.HasValue)
            {
                if (CurrentSilentConfig.DisableFeatureUpdates.Value)
                {
                    Optimize.DisableForcedFeatureUpdates();
                }
                else
                {
                    Optimize.EnableForcedFeatureUpdates();
                }
            }

            if (CurrentSilentConfig.DisableCloudClipboard.HasValue)
            {
                if (CurrentSilentConfig.DisableCloudClipboard.Value)
                {
                    Optimize.DisableCloudClipboard();
                }
                else
                {
                    Optimize.EnableCloudClipboard();
                }
            }

            if (CurrentSilentConfig.RemoveCastToDevice.HasValue)
            {
                if (CurrentSilentConfig.RemoveCastToDevice.Value)
                {
                    Optimize.RemoveCastToDevice();
                }
                else
                {
                    Optimize.AddCastToDevice();
                }
            }

            if (CurrentSilentConfig.DisableActionCenter.HasValue)
            {
                if (CurrentSilentConfig.DisableActionCenter.Value)
                {
                    Optimize.DisableActionCenter();
                }
                else
                {
                    Optimize.EnableActionCenter();
                }
            }
        }
Exemplo n.º 2
0
        private void ApplyAll()
        {
            if (MainForm.wv != WindowsVersion.Unsupported)
            {
                try
                {
                    // universal
                    Optimize.PerformanceTweaks();
                    Optimize.DisableNetworkThrottling();
                    Optimize.DisableDefender();
                    Optimize.DisableSystemRestore();

                    if (DisablePrintServices)
                    {
                        Optimize.DisablePrintSpooler();
                    }
                    else
                    {
                        Optimize.EnablePrintSpooler();
                    }

                    Optimize.DisableMediaPlayerSharing();
                    Optimize.BlockSkypeAds();
                    Optimize.DisableErrorReporting();
                    Optimize.DisableHomeGroup();
                    Optimize.DisableSuperfetch();
                    Optimize.DisableTelemetryTasks();
                    Optimize.DisableOfficeTelemetryTasks();

                    // Windows-specific
                    if ((MainForm.wv == WindowsVersion.Windows7) || (MainForm.wv == WindowsVersion.WindowsServer2008))
                    {
                        Optimize.RemoveWindows10Icon();
                    }

                    if ((MainForm.wv == WindowsVersion.Windows8) || (MainForm.wv == WindowsVersion.WindowsServer2012))
                    {
                        Optimize.RemoveWindows10Icon();
                        Optimize.DisableOneDrive();
                    }

                    if ((MainForm.wv == WindowsVersion.Windows10) || (MainForm.wv == WindowsVersion.WindowsServer2016))
                    {
                        Optimize.RestoreLegacyVolumeSlider();
                        Optimize.DisableCortana();
                        Optimize.DisableXboxLive();
                        Optimize.DisableAutomaticUpdates();
                        Optimize.DisableDiagnosticsTracking();
                        Optimize.DisableWAPPush();
                        Optimize.DisableDataTelemetry();

                        if (DisableSensorServices)
                        {
                            Optimize.DisableSensorServices();
                        }
                        else
                        {
                            Optimize.EnableSensorServices();
                        }

                        Optimize.UninstallOneDrive();
                        Optimize.DisablePrivacyOptions();
                        Optimize.DisableGameBar();
                        Optimize.DisableSyncProviderNotifications();
                        Optimize.DisableStartMenuAds();
                        Optimize.DisableSilentAppInstall();
                        Optimize.DisableMyPeople();
                        Optimize.ExcludeDrivers();
                        Optimize.DisableWindowsInk();
                        Optimize.DisableSpellingAndTypingFeatures();
                    }
                }
                catch //(Exception error)
                {
                    //MessageBox.Show(error.Message);
                }
                finally
                {
                    this.Close();
                }
            }

            this.Close();
        }
Exemplo n.º 3
0
 private void button69_Click(object sender, EventArgs e)
 {
     Optimize.DisableMyPeople();
     button69.Enabled = false;
 }
Exemplo n.º 4
0
 // silent config processing for Windows 10 tweaks
 internal static void ProcessSilentConfigWindows10()
 {
     if (CurrentSilentConfig.EnableLegacyVolumeSlider)
     {
         Optimize.EnableLegacyVolumeSlider();
     }
     else
     {
         Optimize.DisableLegacyVolumeSlider();
     }
     if (CurrentSilentConfig.EnableTaskbarColor)
     {
         Optimize.EnableTaskbarColor();
     }
     else
     {
         Optimize.DisableTaskbarColor();
     }
     if (CurrentSilentConfig.DisableQuickAccessHistory)
     {
         Optimize.DisableQuickAccessHistory();
     }
     else
     {
         Optimize.EnableQuickAccessHistory();
     }
     if (CurrentSilentConfig.DisableStartMenuAds)
     {
         Optimize.DisableStartMenuAds();
     }
     else
     {
         Optimize.EnableStartMenuAds();
     }
     if (CurrentSilentConfig.EnableDarkTheme)
     {
         Optimize.EnableDarkTheme();
     }
     else
     {
         Optimize.EnableLightTheme();
     }
     if (CurrentSilentConfig.UninstallOneDrive)
     {
         Task t = new Task(() => Optimize.UninstallOneDrive());
         t.Start();
     }
     else
     {
         Task t = new Task(() => Optimize.InstallOneDrive());
         t.Start();
     }
     if (CurrentSilentConfig.DisableMyPeople)
     {
         Optimize.DisableMyPeople();
     }
     else
     {
         Optimize.EnableMyPeople();
     }
     if (CurrentSilentConfig.EnableLongPaths)
     {
         Optimize.EnableLongPaths();
     }
     else
     {
         Optimize.DisableLongPaths();
     }
     if (CurrentSilentConfig.DisableAutomaticUpdates)
     {
         Optimize.DisableAutomaticUpdates();
     }
     else
     {
         Optimize.EnableAutomaticUpdates();
     }
     if (CurrentSilentConfig.ExcludeDrivers)
     {
         Optimize.ExcludeDrivers();
     }
     else
     {
         Optimize.IncludeDrivers();
     }
     if (CurrentSilentConfig.DisableTelemetryServices)
     {
         Optimize.DisableTelemetryServices();
     }
     else
     {
         Optimize.EnableTelemetryServices();
     }
     if (CurrentSilentConfig.DisablePrivacyOptions)
     {
         Optimize.DisablePrivacyOptions();
     }
     else
     {
         Optimize.EnablePrivacyOptions();
     }
     if (CurrentSilentConfig.DisableSilentAppInstall)
     {
         Optimize.DisableSilentAppInstall();
     }
     else
     {
         Optimize.EnableSilentAppInstall();
     }
     if (CurrentSilentConfig.DisableCortana)
     {
         Optimize.DisableCortana();
     }
     else
     {
         Optimize.EnableCortana();
     }
     if (CurrentSilentConfig.DisableSensorServices)
     {
         Optimize.DisableSensorServices();
     }
     else
     {
         Optimize.EnableSensorServices();
     }
     if (CurrentSilentConfig.DisableWindowsInk)
     {
         Optimize.DisableWindowsInk();
     }
     else
     {
         Optimize.EnableWindowsInk();
     }
     if (CurrentSilentConfig.DisableSpellingTyping)
     {
         Optimize.DisableSpellingAndTypingFeatures();
     }
     else
     {
         Optimize.EnableSpellingAndTypingFeatures();
     }
     if (CurrentSilentConfig.DisableXboxLive)
     {
         Optimize.DisableXboxLive();
     }
     else
     {
         Optimize.EnableXboxLive();
     }
     if (CurrentSilentConfig.DisableGameBar)
     {
         Optimize.DisableGameBar();
     }
     else
     {
         Optimize.EnableGameBar();
     }
     if (CurrentSilentConfig.DisableInsiderService)
     {
         Optimize.DisableInsiderService();
     }
     else
     {
         Optimize.EnableInsiderService();
     }
     if (CurrentSilentConfig.DisableFeatureUpdates)
     {
         Optimize.DisableForcedFeatureUpdates();
     }
     else
     {
         Optimize.EnableForcedFeatureUpdates();
     }
     if (CurrentSilentConfig.DisableCloudClipboard)
     {
         Optimize.DisableCloudClipboard();
     }
     else
     {
         Optimize.EnableCloudClipboard();
     }
 }