|
@@ -24,382 +24,656 @@ namespace Optimizer
|
|
|
// silent config processing for universal tweaks
|
|
|
internal static void ProcessSilentConfigGeneral()
|
|
|
{
|
|
|
- if (CurrentSilentConfig.EnablePerformanceTweaks)
|
|
|
+ if (CurrentSilentConfig.EnablePerformanceTweaks.HasValue)
|
|
|
{
|
|
|
- Optimize.EnablePerformanceTweaks();
|
|
|
+ if (CurrentSilentConfig.EnablePerformanceTweaks.Value)
|
|
|
+ {
|
|
|
+ Optimize.EnablePerformanceTweaks();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.DisablePerformanceTweaks();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableNetworkThrottling.HasValue)
|
|
|
{
|
|
|
- Optimize.DisablePerformanceTweaks();
|
|
|
+ if (CurrentSilentConfig.DisableNetworkThrottling.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableNetworkThrottling();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableNetworkThrottling();
|
|
|
+ }
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableNetworkThrottling)
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableWindowsDefender.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableNetworkThrottling();
|
|
|
+ if (CurrentSilentConfig.DisableWindowsDefender.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableDefender();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableDefender();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableSystemRestore.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableNetworkThrottling();
|
|
|
+ if (CurrentSilentConfig.DisableSystemRestore.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableSystemRestore();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableSystemRestore();
|
|
|
+ }
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableWindowsDefender)
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisablePrintService.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableDefender();
|
|
|
+ if (CurrentSilentConfig.DisablePrintService.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisablePrintService();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnablePrintService();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableMediaPlayerSharing.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableDefender();
|
|
|
+ if (CurrentSilentConfig.DisableMediaPlayerSharing.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableMediaPlayerSharing();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableMediaPlayerSharing();
|
|
|
+ }
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableSystemRestore)
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.BlockSkypeAds.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableSystemRestore();
|
|
|
+ if (CurrentSilentConfig.BlockSkypeAds.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableSkypeAds();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableSkypeAds();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableErrorReporting.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableSystemRestore();
|
|
|
+ if (CurrentSilentConfig.DisableErrorReporting.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableErrorReporting();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableErrorReporting();
|
|
|
+ }
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisablePrintService)
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableHomeGroup.HasValue)
|
|
|
{
|
|
|
- Optimize.DisablePrintService();
|
|
|
+ if (CurrentSilentConfig.DisableHomeGroup.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableHomeGroup();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableHomeGroup();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableSuperfetch.HasValue)
|
|
|
{
|
|
|
- Optimize.EnablePrintService();
|
|
|
+ if (CurrentSilentConfig.DisableSuperfetch.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableSuperfetch();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableSuperfetch();
|
|
|
+ }
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableMediaPlayerSharing)
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableTelemetryTasks.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableMediaPlayerSharing();
|
|
|
+ if (CurrentSilentConfig.DisableTelemetryTasks.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableTelemetryTasks();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableTelemetryTasks();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableOffice2016Telemetry.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableMediaPlayerSharing();
|
|
|
+ if (CurrentSilentConfig.DisableOffice2016Telemetry.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableOffice2016Telemetry();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableOffice2016Telemetry();
|
|
|
+ }
|
|
|
}
|
|
|
- if (CurrentSilentConfig.BlockSkypeAds)
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableCompatibilityAssistant.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableSkypeAds();
|
|
|
+ if (CurrentSilentConfig.DisableCompatibilityAssistant.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableCompatibilityAssistant();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableCompatibilityAssistant();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableFaxService.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableSkypeAds();
|
|
|
+ if (CurrentSilentConfig.DisableFaxService.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableFaxService();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableFaxService();
|
|
|
+ }
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableErrorReporting)
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableSmartScreen.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableErrorReporting();
|
|
|
+ if (CurrentSilentConfig.DisableSmartScreen.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableSmartScreen();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableSmartScreen();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableStickyKeys.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableErrorReporting();
|
|
|
+ if (CurrentSilentConfig.DisableStickyKeys.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableStickyKeys();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableStickyKeys();
|
|
|
+ }
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableHomeGroup)
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ // silent config processing for Windows 8 tweaks
|
|
|
+ internal static void ProcessSilentConfigWindows8()
|
|
|
+ {
|
|
|
+ if (CurrentSilentConfig.DisableOneDrive.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableHomeGroup();
|
|
|
+ if (CurrentSilentConfig.DisableOneDrive.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableOneDrive();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableOneDrive();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ // silent config processing for Windows 10 tweaks
|
|
|
+ internal static void ProcessSilentConfigWindows10()
|
|
|
+ {
|
|
|
+ if (CurrentSilentConfig.EnableLegacyVolumeSlider.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableHomeGroup();
|
|
|
+ if (CurrentSilentConfig.EnableLegacyVolumeSlider.Value)
|
|
|
+ {
|
|
|
+ Optimize.EnableLegacyVolumeSlider();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.DisableLegacyVolumeSlider();
|
|
|
+ }
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableSuperfetch)
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.EnableTaskbarColor.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableSuperfetch();
|
|
|
+ if (CurrentSilentConfig.EnableTaskbarColor.Value)
|
|
|
+ {
|
|
|
+ Optimize.EnableTaskbarColor();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.DisableTaskbarColor();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableQuickAccessHistory.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableSuperfetch();
|
|
|
+ if (CurrentSilentConfig.DisableQuickAccessHistory.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableQuickAccessHistory();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableQuickAccessHistory();
|
|
|
+ }
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableTelemetryTasks)
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableStartMenuAds.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableTelemetryTasks();
|
|
|
+ if (CurrentSilentConfig.DisableStartMenuAds.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableStartMenuAds();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableStartMenuAds();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.EnableDarkTheme.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableTelemetryTasks();
|
|
|
+ if (CurrentSilentConfig.EnableDarkTheme.Value)
|
|
|
+ {
|
|
|
+ Optimize.EnableDarkTheme();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableLightTheme();
|
|
|
+ }
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableOffice2016Telemetry)
|
|
|
- {
|
|
|
- Optimize.DisableOffice2016Telemetry();
|
|
|
+
|
|
|
+ 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();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableMyPeople.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableOffice2016Telemetry();
|
|
|
+ if (CurrentSilentConfig.DisableMyPeople.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableMyPeople();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableMyPeople();
|
|
|
+ }
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableCompatibilityAssistant)
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.EnableLongPaths.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableCompatibilityAssistant();
|
|
|
+ if (CurrentSilentConfig.EnableLongPaths.Value)
|
|
|
+ {
|
|
|
+ Optimize.EnableLongPaths();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.DisableLongPaths();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableAutomaticUpdates.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableCompatibilityAssistant();
|
|
|
+ if (CurrentSilentConfig.DisableAutomaticUpdates.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableAutomaticUpdates();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableAutomaticUpdates();
|
|
|
+ }
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableFaxService)
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.ExcludeDrivers.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableFaxService();
|
|
|
+ if (CurrentSilentConfig.ExcludeDrivers.Value)
|
|
|
+ {
|
|
|
+ Optimize.ExcludeDrivers();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.IncludeDrivers();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableTelemetryServices.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableFaxService();
|
|
|
+ if (CurrentSilentConfig.DisableTelemetryServices.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableTelemetryServices();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableTelemetryServices();
|
|
|
+ }
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableSmartScreen)
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisablePrivacyOptions.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableSmartScreen();
|
|
|
+ if (CurrentSilentConfig.DisablePrivacyOptions.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisablePrivacyOptions();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnablePrivacyOptions();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableSilentAppInstall.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableSmartScreen();
|
|
|
+ if (CurrentSilentConfig.DisableSilentAppInstall.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableSilentAppInstall();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableSilentAppInstall();
|
|
|
+ }
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableStickyKeys)
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableCortana.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableStickyKeys();
|
|
|
+ if (CurrentSilentConfig.DisableCortana.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableCortana();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableCortana();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableSensorServices.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableStickyKeys();
|
|
|
+ if (CurrentSilentConfig.DisableSensorServices.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableSensorServices();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableSensorServices();
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- // silent config processing for Windows 8 tweaks
|
|
|
- internal static void ProcessSilentConfigWindows8()
|
|
|
- {
|
|
|
- if (CurrentSilentConfig.DisableOneDrive)
|
|
|
+ if (CurrentSilentConfig.DisableWindowsInk.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableOneDrive();
|
|
|
+ if (CurrentSilentConfig.DisableWindowsInk.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableWindowsInk();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableWindowsInk();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableSpellingTyping.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableOneDrive();
|
|
|
+ if (CurrentSilentConfig.DisableSpellingTyping.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableSpellingAndTypingFeatures();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableSpellingAndTypingFeatures();
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- // silent config processing for Windows 10 tweaks
|
|
|
- internal static void ProcessSilentConfigWindows10()
|
|
|
- {
|
|
|
- if (CurrentSilentConfig.EnableLegacyVolumeSlider)
|
|
|
+ if (CurrentSilentConfig.DisableXboxLive.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableLegacyVolumeSlider();
|
|
|
+ if (CurrentSilentConfig.DisableXboxLive.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableXboxLive();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableXboxLive();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableGameBar.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableLegacyVolumeSlider();
|
|
|
+ if (CurrentSilentConfig.DisableGameBar.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableGameBar();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableGameBar();
|
|
|
+ }
|
|
|
}
|
|
|
- if (CurrentSilentConfig.EnableTaskbarColor)
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableInsiderService.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableTaskbarColor();
|
|
|
+ if (CurrentSilentConfig.DisableInsiderService.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableInsiderService();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableInsiderService();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableFeatureUpdates.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableTaskbarColor();
|
|
|
+ if (CurrentSilentConfig.DisableFeatureUpdates.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableForcedFeatureUpdates();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableForcedFeatureUpdates();
|
|
|
+ }
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableQuickAccessHistory)
|
|
|
+
|
|
|
+ if (CurrentSilentConfig.DisableCloudClipboard.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableQuickAccessHistory();
|
|
|
+ if (CurrentSilentConfig.DisableCloudClipboard.Value)
|
|
|
+ {
|
|
|
+ Optimize.DisableCloudClipboard();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Optimize.EnableCloudClipboard();
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ // updating options using silent config
|
|
|
+ internal static void SilentUpdateOptionsGeneral()
|
|
|
+ {
|
|
|
+ if (CurrentSilentConfig.EnablePerformanceTweaks.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableQuickAccessHistory();
|
|
|
+ Options.CurrentOptions.EnablePerformanceTweaks = CurrentSilentConfig.EnablePerformanceTweaks.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableStartMenuAds)
|
|
|
+ if (CurrentSilentConfig.DisableNetworkThrottling.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableStartMenuAds();
|
|
|
+ Options.CurrentOptions.DisableNetworkThrottling = CurrentSilentConfig.DisableNetworkThrottling.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ if (CurrentSilentConfig.DisableWindowsDefender.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableStartMenuAds();
|
|
|
+ Options.CurrentOptions.DisableWindowsDefender = CurrentSilentConfig.DisableWindowsDefender.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.EnableDarkTheme)
|
|
|
+ if (CurrentSilentConfig.DisableSystemRestore.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableDarkTheme();
|
|
|
+ Options.CurrentOptions.DisableSystemRestore = CurrentSilentConfig.DisableSystemRestore.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ if (CurrentSilentConfig.DisablePrintService.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableLightTheme();
|
|
|
+ Options.CurrentOptions.DisablePrintService = CurrentSilentConfig.DisablePrintService.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.UninstallOneDrive)
|
|
|
+ if (CurrentSilentConfig.DisableMediaPlayerSharing.HasValue)
|
|
|
{
|
|
|
- Task t = new Task(() => Optimize.UninstallOneDrive());
|
|
|
- t.Start();
|
|
|
+ Options.CurrentOptions.DisableMediaPlayerSharing = CurrentSilentConfig.DisableMediaPlayerSharing.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ if (CurrentSilentConfig.BlockSkypeAds.HasValue)
|
|
|
{
|
|
|
- Task t = new Task(() => Optimize.InstallOneDrive());
|
|
|
- t.Start();
|
|
|
+ Options.CurrentOptions.BlockSkypeAds = CurrentSilentConfig.BlockSkypeAds.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableMyPeople)
|
|
|
+ if (CurrentSilentConfig.DisableErrorReporting.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableMyPeople();
|
|
|
+ Options.CurrentOptions.DisableErrorReporting = CurrentSilentConfig.DisableErrorReporting.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ if (CurrentSilentConfig.DisableHomeGroup.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableMyPeople();
|
|
|
+ Options.CurrentOptions.DisableHomeGroup = CurrentSilentConfig.DisableHomeGroup.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.EnableLongPaths)
|
|
|
+ if (CurrentSilentConfig.DisableSuperfetch.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableLongPaths();
|
|
|
+ Options.CurrentOptions.DisableSuperfetch = CurrentSilentConfig.DisableSuperfetch.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ if (CurrentSilentConfig.DisableTelemetryTasks.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableLongPaths();
|
|
|
+ Options.CurrentOptions.DisableTelemetryTasks = CurrentSilentConfig.DisableTelemetryTasks.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableAutomaticUpdates)
|
|
|
+ if (CurrentSilentConfig.DisableOffice2016Telemetry.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableAutomaticUpdates();
|
|
|
+ Options.CurrentOptions.DisableOffice2016Telemetry = CurrentSilentConfig.DisableOffice2016Telemetry.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ if (CurrentSilentConfig.DisableCompatibilityAssistant.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableAutomaticUpdates();
|
|
|
+ Options.CurrentOptions.DisableCompatibilityAssistant = CurrentSilentConfig.DisableCompatibilityAssistant.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.ExcludeDrivers)
|
|
|
+ if (CurrentSilentConfig.DisableFaxService.HasValue)
|
|
|
{
|
|
|
- Optimize.ExcludeDrivers();
|
|
|
+ Options.CurrentOptions.DisableFaxService = CurrentSilentConfig.DisableFaxService.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ if (CurrentSilentConfig.DisableSmartScreen.HasValue)
|
|
|
{
|
|
|
- Optimize.IncludeDrivers();
|
|
|
+ Options.CurrentOptions.DisableSmartScreen = CurrentSilentConfig.DisableSmartScreen.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableTelemetryServices)
|
|
|
+ if (CurrentSilentConfig.DisableStickyKeys.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableTelemetryServices();
|
|
|
+ Options.CurrentOptions.DisableStickyKeys = CurrentSilentConfig.DisableStickyKeys.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ }
|
|
|
+
|
|
|
+ internal static void SilentUpdateOptions8()
|
|
|
+ {
|
|
|
+ if (CurrentSilentConfig.DisableOneDrive.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableTelemetryServices();
|
|
|
+ Options.CurrentOptions.DisableOneDrive = CurrentSilentConfig.DisableOneDrive.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisablePrivacyOptions)
|
|
|
+ }
|
|
|
+
|
|
|
+ internal static void SilentUpdateOptions10()
|
|
|
+ {
|
|
|
+ if (CurrentSilentConfig.EnableLegacyVolumeSlider.HasValue)
|
|
|
{
|
|
|
- Optimize.DisablePrivacyOptions();
|
|
|
+ Options.CurrentOptions.EnableLegacyVolumeSlider = CurrentSilentConfig.EnableLegacyVolumeSlider.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ if (CurrentSilentConfig.EnableTaskbarColor.HasValue)
|
|
|
{
|
|
|
- Optimize.EnablePrivacyOptions();
|
|
|
+ Options.CurrentOptions.EnableTaskbarColor = CurrentSilentConfig.EnableTaskbarColor.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableSilentAppInstall)
|
|
|
+ if (CurrentSilentConfig.DisableQuickAccessHistory.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableSilentAppInstall();
|
|
|
+ Options.CurrentOptions.DisableQuickAccessHistory = CurrentSilentConfig.DisableQuickAccessHistory.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ if (CurrentSilentConfig.DisableStartMenuAds.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableSilentAppInstall();
|
|
|
+ Options.CurrentOptions.DisableStartMenuAds = CurrentSilentConfig.DisableStartMenuAds.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableCortana)
|
|
|
+ if (CurrentSilentConfig.EnableDarkTheme.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableCortana();
|
|
|
+ Options.CurrentOptions.EnableDarkTheme = CurrentSilentConfig.EnableDarkTheme.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ if (CurrentSilentConfig.UninstallOneDrive.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableCortana();
|
|
|
+ Options.CurrentOptions.UninstallOneDrive = CurrentSilentConfig.UninstallOneDrive.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableSensorServices)
|
|
|
+ if (CurrentSilentConfig.DisableMyPeople.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableSensorServices();
|
|
|
+ Options.CurrentOptions.DisableMyPeople = CurrentSilentConfig.DisableMyPeople.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ if (CurrentSilentConfig.EnableLongPaths.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableSensorServices();
|
|
|
+ Options.CurrentOptions.EnableLongPaths = CurrentSilentConfig.EnableLongPaths.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableWindowsInk)
|
|
|
+ if (CurrentSilentConfig.DisableAutomaticUpdates.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableWindowsInk();
|
|
|
+ Options.CurrentOptions.DisableAutomaticUpdates = CurrentSilentConfig.DisableAutomaticUpdates.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ if (CurrentSilentConfig.ExcludeDrivers.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableWindowsInk();
|
|
|
+ Options.CurrentOptions.ExcludeDrivers = CurrentSilentConfig.ExcludeDrivers.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableSpellingTyping)
|
|
|
+ if (CurrentSilentConfig.DisableTelemetryServices.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableSpellingAndTypingFeatures();
|
|
|
+ Options.CurrentOptions.DisableTelemetryServices = CurrentSilentConfig.DisableTelemetryServices.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ if (CurrentSilentConfig.DisablePrivacyOptions.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableSpellingAndTypingFeatures();
|
|
|
+ Options.CurrentOptions.DisablePrivacyOptions = CurrentSilentConfig.DisablePrivacyOptions.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableXboxLive)
|
|
|
+ if (CurrentSilentConfig.DisableSilentAppInstall.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableXboxLive();
|
|
|
+ Options.CurrentOptions.DisableSilentAppInstall = CurrentSilentConfig.DisableSilentAppInstall.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ if (CurrentSilentConfig.DisableCortana.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableXboxLive();
|
|
|
+ Options.CurrentOptions.DisableCortana = CurrentSilentConfig.DisableCortana.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableGameBar)
|
|
|
+ if (CurrentSilentConfig.DisableSensorServices.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableGameBar();
|
|
|
+ Options.CurrentOptions.DisableSensorServices = CurrentSilentConfig.DisableSensorServices.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ if (CurrentSilentConfig.DisableWindowsInk.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableGameBar();
|
|
|
+ Options.CurrentOptions.DisableWindowsInk = CurrentSilentConfig.DisableWindowsInk.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableInsiderService)
|
|
|
+ if (CurrentSilentConfig.DisableSpellingTyping.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableInsiderService();
|
|
|
+ Options.CurrentOptions.DisableSpellingTyping = CurrentSilentConfig.DisableSpellingTyping.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ if (CurrentSilentConfig.DisableXboxLive.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableInsiderService();
|
|
|
+ Options.CurrentOptions.DisableXboxLive = CurrentSilentConfig.DisableXboxLive.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableFeatureUpdates)
|
|
|
+ if (CurrentSilentConfig.DisableGameBar.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableForcedFeatureUpdates();
|
|
|
+ Options.CurrentOptions.DisableGameBar = CurrentSilentConfig.DisableGameBar.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ if (CurrentSilentConfig.DisableInsiderService.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableForcedFeatureUpdates();
|
|
|
+ Options.CurrentOptions.DisableInsiderService = CurrentSilentConfig.DisableInsiderService.Value;
|
|
|
}
|
|
|
- if (CurrentSilentConfig.DisableCloudClipboard)
|
|
|
+ if (CurrentSilentConfig.DisableFeatureUpdates.HasValue)
|
|
|
{
|
|
|
- Optimize.DisableCloudClipboard();
|
|
|
+ Options.CurrentOptions.DisableFeatureUpdates = CurrentSilentConfig.DisableFeatureUpdates.Value;
|
|
|
}
|
|
|
- else
|
|
|
+ if (CurrentSilentConfig.DisableCloudClipboard.HasValue)
|
|
|
{
|
|
|
- Optimize.EnableCloudClipboard();
|
|
|
+ Options.CurrentOptions.DisableCloudClipboard = CurrentSilentConfig.DisableCloudClipboard.Value;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- // updating options using silent config
|
|
|
- internal static void SilentUpdateOptionsGeneral()
|
|
|
- {
|
|
|
- Options.CurrentOptions.EnablePerformanceTweaks = CurrentSilentConfig.EnablePerformanceTweaks;
|
|
|
- Options.CurrentOptions.DisableNetworkThrottling = CurrentSilentConfig.DisableNetworkThrottling;
|
|
|
- Options.CurrentOptions.DisableWindowsDefender = CurrentSilentConfig.DisableWindowsDefender;
|
|
|
- Options.CurrentOptions.DisableSystemRestore = CurrentSilentConfig.DisableSystemRestore;
|
|
|
- Options.CurrentOptions.DisablePrintService = CurrentSilentConfig.DisablePrintService;
|
|
|
- Options.CurrentOptions.DisableMediaPlayerSharing = CurrentSilentConfig.DisableMediaPlayerSharing;
|
|
|
- Options.CurrentOptions.BlockSkypeAds = CurrentSilentConfig.BlockSkypeAds;
|
|
|
- Options.CurrentOptions.DisableErrorReporting = CurrentSilentConfig.DisableErrorReporting;
|
|
|
- Options.CurrentOptions.DisableHomeGroup = CurrentSilentConfig.DisableHomeGroup;
|
|
|
- Options.CurrentOptions.DisableSuperfetch = CurrentSilentConfig.DisableSuperfetch;
|
|
|
- Options.CurrentOptions.DisableTelemetryTasks = CurrentSilentConfig.DisableTelemetryTasks;
|
|
|
- Options.CurrentOptions.DisableOffice2016Telemetry = CurrentSilentConfig.DisableOffice2016Telemetry;
|
|
|
- Options.CurrentOptions.DisableCompatibilityAssistant = CurrentSilentConfig.DisableCompatibilityAssistant;
|
|
|
- Options.CurrentOptions.DisableFaxService = CurrentSilentConfig.DisableFaxService;
|
|
|
- Options.CurrentOptions.DisableSmartScreen = CurrentSilentConfig.DisableSmartScreen;
|
|
|
- Options.CurrentOptions.DisableStickyKeys = CurrentSilentConfig.DisableStickyKeys;
|
|
|
- }
|
|
|
-
|
|
|
- internal static void SilentUpdateOptions8()
|
|
|
- {
|
|
|
- Options.CurrentOptions.DisableOneDrive = CurrentSilentConfig.DisableOneDrive;
|
|
|
- }
|
|
|
-
|
|
|
- internal static void SilentUpdateOptions10()
|
|
|
- {
|
|
|
- Options.CurrentOptions.EnableLegacyVolumeSlider = CurrentSilentConfig.EnableLegacyVolumeSlider;
|
|
|
- Options.CurrentOptions.EnableTaskbarColor = CurrentSilentConfig.EnableTaskbarColor;
|
|
|
- Options.CurrentOptions.DisableQuickAccessHistory = CurrentSilentConfig.DisableQuickAccessHistory;
|
|
|
- Options.CurrentOptions.DisableStartMenuAds = CurrentSilentConfig.DisableStartMenuAds;
|
|
|
- Options.CurrentOptions.EnableDarkTheme = CurrentSilentConfig.EnableDarkTheme;
|
|
|
- Options.CurrentOptions.UninstallOneDrive = CurrentSilentConfig.UninstallOneDrive;
|
|
|
- Options.CurrentOptions.DisableMyPeople = CurrentSilentConfig.DisableMyPeople;
|
|
|
- Options.CurrentOptions.EnableLongPaths = CurrentSilentConfig.EnableLongPaths;
|
|
|
- Options.CurrentOptions.DisableAutomaticUpdates = CurrentSilentConfig.DisableAutomaticUpdates;
|
|
|
- Options.CurrentOptions.ExcludeDrivers = CurrentSilentConfig.ExcludeDrivers;
|
|
|
- Options.CurrentOptions.DisableTelemetryServices = CurrentSilentConfig.DisableTelemetryServices;
|
|
|
- Options.CurrentOptions.DisablePrivacyOptions = CurrentSilentConfig.DisablePrivacyOptions;
|
|
|
- Options.CurrentOptions.DisableSilentAppInstall = CurrentSilentConfig.DisableSilentAppInstall;
|
|
|
- Options.CurrentOptions.DisableCortana = CurrentSilentConfig.DisableCortana;
|
|
|
- Options.CurrentOptions.DisableSensorServices = CurrentSilentConfig.DisableSensorServices;
|
|
|
- Options.CurrentOptions.DisableWindowsInk = CurrentSilentConfig.DisableWindowsInk;
|
|
|
- Options.CurrentOptions.DisableSpellingTyping = CurrentSilentConfig.DisableSpellingTyping;
|
|
|
- Options.CurrentOptions.DisableXboxLive = CurrentSilentConfig.DisableXboxLive;
|
|
|
- Options.CurrentOptions.DisableGameBar = CurrentSilentConfig.DisableGameBar;
|
|
|
- Options.CurrentOptions.DisableInsiderService = CurrentSilentConfig.DisableInsiderService;
|
|
|
- Options.CurrentOptions.DisableFeatureUpdates = CurrentSilentConfig.DisableFeatureUpdates;
|
|
|
- Options.CurrentOptions.DisableCloudClipboard = CurrentSilentConfig.DisableCloudClipboard;
|
|
|
- }
|
|
|
}
|
|
|
}
|