deadmoon 4 rokov pred
rodič
commit
69ad1be5a5
7 zmenil súbory, kde vykonal 29 pridanie a 16 odobranie
  1. 4 0
      CHANGELOG.md
  2. 3 0
      CONFS.md
  3. 9 9
      Optimizer/Optimize.cs
  4. 8 2
      Optimizer/Program.cs
  5. 2 2
      Optimizer/Utilities.cs
  6. 2 2
      README.md
  7. 1 1
      version.txt

+ 4 - 0
CHANGELOG.md

@@ -2,6 +2,10 @@
 
 All notable changes to this project will be documented in this file.
 
+## [8.2] - 2021-05-31
+- New: Added "/reset" switch for troubleshooting 
+- Improved: Enabling Automatic Updates and Defender is better now
+
 ## [8.1] - 2021-05-31
 - Hotfix: Pinger sometimes not working
 

+ 3 - 0
CONFS.md

@@ -20,3 +20,6 @@ https://github.com/hellzerg/optimizer/blob/master/confs/w10.conf
 ## Run Optimizer on Windows Server 2008-2012-2016-2019 ##
 #### Some options might not work properly ####
 optimizer.exe /unsafe
+
+## Reset Optimizer configuration might fix it when can't open
+optimizer.exe /reset

+ 9 - 9
Optimizer/Optimize.cs

@@ -381,14 +381,14 @@ namespace Optimizer
 
         internal static void EnableDefender()
         {
-            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender", "DisableRealtimeMonitoring", "0", RegistryValueKind.DWord);
-            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender", "DisableAntiSpyware", "0", RegistryValueKind.DWord);
-            Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Spynet", "SpyNetReporting", "1", RegistryValueKind.DWord);
-            Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Spynet", "SubmitSamplesConsent", "1", RegistryValueKind.DWord);
-            Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\MRT", "DontReportInfectionInformation", "0", RegistryValueKind.DWord);
-            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection", "DisableBehaviorMonitoring", "0", RegistryValueKind.DWord);
-            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection", "DisableOnAccessProtection", "0", RegistryValueKind.DWord);
-            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection", "DisableScanOnRealtimeEnable", "0", RegistryValueKind.DWord);
+            Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Policies\Microsoft\Windows Defender", true).DeleteValue("DisableRealtimeMonitoring", false);
+            Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Policies\Microsoft\Windows Defender", true).DeleteValue("DisableAntiSpyware", false);
+            Registry.LocalMachine.OpenSubKey(@"Software\Policies\Microsoft\Windows Defender\Spynet", true).DeleteValue("SpyNetReporting", false);
+            Registry.LocalMachine.OpenSubKey(@"Software\Policies\Microsoft\Windows Defender\Spynet", true).DeleteValue("SubmitSamplesConsent", false);
+            Registry.LocalMachine.OpenSubKey(@"Software\Policies\Microsoft\MRT", true).DeleteValue("DontReportInfectionInformation", false);
+            Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection", true).DeleteValue("DisableBehaviorMonitoring", false);
+            Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection", true).DeleteValue("DisableOnAccessProtection", false);
+            Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection", true).DeleteValue("DisableScanOnRealtimeEnable", false);
 
             Utilities.RunCommand("Gpupdate /Force");
         }
@@ -665,7 +665,7 @@ namespace Optimizer
             Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config", true).DeleteValue("DODownloadMode", false);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DoSvc", "Start", "3", RegistryValueKind.DWord);
 
-            Utilities.StartService("DoSvc");
+            //Utilities.StartService("DoSvc");
 
             // enable silent app install
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SilentInstalledAppsEnabled", "1", RegistryValueKind.DWord);

+ 8 - 2
Optimizer/Program.cs

@@ -13,9 +13,9 @@ namespace Optimizer
         // Enter current version here
 
         internal readonly static float Major = 8;
-        internal readonly static float Minor = 1;
+        internal readonly static float Minor = 2;
 
-        internal readonly static bool EXPERIMENTAL_BUILD = true;
+        internal readonly static bool EXPERIMENTAL_BUILD = false;
 
         internal static string GetCurrentVersionTostring()
         {
@@ -102,6 +102,12 @@ namespace Optimizer
                             return;
                         }
 
+                        if (arg == "/reset")
+                        {
+                            Utilities.ResetConfiguration(true);
+                            return;
+                        }
+
                         if (arg.StartsWith("/"))
                         {
                             if (File.Exists(arg.Remove(0, 1)))

+ 2 - 2
Optimizer/Utilities.cs

@@ -598,7 +598,7 @@ namespace Optimizer
             }
         }
 
-        internal static void ResetConfiguration()
+        internal static void ResetConfiguration(bool withoutRestart = false)
         {
             try
             {
@@ -610,7 +610,7 @@ namespace Optimizer
             }
             finally
             {
-                Application.Restart();
+                if (withoutRestart == false) Application.Restart();
             }
         }
 

+ 2 - 2
README.md

@@ -54,6 +54,6 @@ https://github.com/hellzerg/optimizer/blob/master/LEGACY.md
 
 ## Details: ##
 
-* Latest version: 8.1
+* Latest version: 8.2
 * Released: May 31, 2021
-* SHA256: F507A153FBBD8992C0E8AE84AD1E7A05E05EA7A0150D858566ADCC5C2B2F2B91
+* SHA256: 086CF6D52704634E9BCDDCA745B3B62C58842FE722327E56ECE1717D82C377FD

+ 1 - 1
version.txt

@@ -1 +1 @@
-8.1
+8.2