Pārlūkot izejas kodu

Major updates and hotfixes v15.7

deadmoon 1 gadu atpakaļ
vecāks
revīzija
4aa1618827
48 mainītis faili ar 893 papildinājumiem un 484 dzēšanām
  1. 11 5
      AUTOMATION.md
  2. 8 0
      CHANGELOG.md
  3. 1 1
      Optimizer/EmbeddedAssembly.cs
  4. 3 2
      Optimizer/ErrorLogger.cs
  5. 4 4
      Optimizer/FontHelper.cs
  6. 196 214
      Optimizer/Forms/MainForm.Designer.cs
  7. 31 23
      Optimizer/Forms/MainForm.cs
  8. 1 1
      Optimizer/Forms/MainForm.resx
  9. 2 2
      Optimizer/Forms/StartupRestoreForm.cs
  10. 23 99
      Optimizer/HostsHelper.cs
  11. 11 11
      Optimizer/IndiciumHelper.cs
  12. 9 9
      Optimizer/IntegratorHelper.cs
  13. 16 14
      Optimizer/OptimizeHelper.cs
  14. 1 1
      Optimizer/Options.cs
  15. 2 2
      Optimizer/PingerHelper.cs
  16. 4 3
      Optimizer/Program.cs
  17. 7 7
      Optimizer/Resources/i18n/AR.json
  18. 8 1
      Optimizer/Resources/i18n/CN.json
  19. 8 1
      Optimizer/Resources/i18n/CZ.json
  20. 8 1
      Optimizer/Resources/i18n/DE.json
  21. 8 1
      Optimizer/Resources/i18n/ES.json
  22. 8 1
      Optimizer/Resources/i18n/FA.json
  23. 8 1
      Optimizer/Resources/i18n/FR.json
  24. 8 1
      Optimizer/Resources/i18n/HU.json
  25. 8 1
      Optimizer/Resources/i18n/IT.json
  26. 8 1
      Optimizer/Resources/i18n/JA.json
  27. 8 1
      Optimizer/Resources/i18n/KO.json
  28. 8 1
      Optimizer/Resources/i18n/KU.json
  29. 8 1
      Optimizer/Resources/i18n/NL.json
  30. 8 1
      Optimizer/Resources/i18n/PL.json
  31. 8 1
      Optimizer/Resources/i18n/PT.json
  32. 8 1
      Optimizer/Resources/i18n/RO.json
  33. 8 1
      Optimizer/Resources/i18n/RU.json
  34. 8 1
      Optimizer/Resources/i18n/TR.json
  35. 8 1
      Optimizer/Resources/i18n/TW.json
  36. 8 1
      Optimizer/Resources/i18n/UA.json
  37. 6 3
      Optimizer/SilentConfig.cs
  38. 40 29
      Optimizer/SilentOps.cs
  39. 4 4
      Optimizer/StartupHelper.cs
  40. 5 5
      Optimizer/StartupItem.cs
  41. 5 1
      Optimizer/UWPHelper.cs
  42. 16 16
      Optimizer/Utilities.cs
  43. 6 6
      README.md
  44. 127 0
      templates/template-windows10.json
  45. 4 2
      templates/template-windows11.json
  46. 98 0
      templates/template-windows7.json
  47. 99 0
      templates/template-windows8.json
  48. 1 1
      version.txt

+ 11 - 5
AUTOMATION.md

@@ -2,7 +2,11 @@
 
 To automate a range of operations using a provided template, follow these steps:
 
-1. **Download the Template**: Obtain the template file from [this link](https://github.com/hellzerg/optimizer/blob/master/templates/optimizer-template.json).
+1. **Download the Template**: Obtain the template file for your Windows version:
+- [Windows 7](https://github.com/hellzerg/optimizer/blob/master/templates/template-windows7.json)
+- [Windows 8.1](https://github.com/hellzerg/optimizer/blob/master/templates/template-windows8.json)
+- [Windows 10](https://github.com/hellzerg/optimizer/blob/master/templates/template-windows10.json)
+- [Windows 11](https://github.com/hellzerg/optimizer/blob/master/templates/template-windows11.json)
 
 2. **Edit the Template**: Customize the template configuration according to your needs.
 
@@ -41,22 +45,24 @@ To automate a range of operations using a provided template, follow these steps:
 
 ### Hosts
 - Manage hosts entries:
+- Mark `IncludeWwwCname` to `true` in order to automatically adding an extra `www.` record for each entry.
+- Entries in the `Remove` list should be the domain names you want remove from the hosts file.
 - Entries in the `Block` list route to `0.0.0.0`, effectively blocking access.
 - Entries in the `Add` list are added. Example:
 
  ```
  "HostsEditor": {
+     "IncludeWwwCname": true,
      "Block": ["youtube.com", "google.com"],
+     "Remove": ["facebook.com"]
      "Add": [
          {
              "Domain": "test.com",
-             "IPAddress": "192.168.1.5",
-             "Comment": "comment is optional"
+             "IPAddress": "192.168.1.5"
          },
          {
              "Domain": "test2.com",
-             "IPAddress": "192.168.1.9",
-             "Comment": ""
+             "IPAddress": "192.168.1.9"
          }
      ]
  }

+ 8 - 0
CHANGELOG.md

@@ -1,3 +1,11 @@
+## [15.7] - 2023-08-19
+- New: Change Windows default font in Integrator (#358)
+- New: Template engine now runs on Windows Server 2008 or newer
+- Hotfix: Rare crash bug in UWP apps loading
+- Improved: Tab glitching resolved (#376)
+- Improved: Disable Start Menu ads and Disable Store Updates
+- Improved: Template engine changes regarding Hosts editing and logging
+
 ## [15.6] - 2023-07-22
 - Hotfix: Crash on UWP load apps (#369 #370)
 

+ 1 - 1
Optimizer/EmbeddedAssembly.cs

@@ -34,7 +34,7 @@ namespace Optimizer
                 }
                 catch (Exception ex)
                 {
-                    ErrorLogger.LogError("EmbeddedAssembly.Load", ex.Message, ex.StackTrace);
+                    Logger.LogError("EmbeddedAssembly.Load", ex.Message, ex.StackTrace);
                 }
             }
 

+ 3 - 2
Optimizer/ErrorLogger.cs

@@ -4,7 +4,7 @@ using System.Text;
 
 namespace Optimizer
 {
-    internal static class ErrorLogger
+    internal static class Logger
     {
         internal static string ErrorLogFile = Path.Combine(CoreHelper.CoreFolder, "Optimizer.log");
 
@@ -33,6 +33,7 @@ namespace Optimizer
 
             _silentReportLog.AppendLine(Utilities.GetWindowsDetails());
             _silentReportLog.AppendLine(string.Format("Optimizer {0} - .NET Framework {1} - Experimental build: {2}", Program.GetCurrentVersionTostring(), Utilities.GetNETFramework(), Program.EXPERIMENTAL_BUILD));
+            _silentReportLog.AppendLine($"{DateTime.Now.ToLongDateString()} - {DateTime.Now.ToLongTimeString()}");
 
             _silentReportLog.AppendLine();
             _silentReportLog.AppendLine();
@@ -42,7 +43,7 @@ namespace Optimizer
         {
             try
             {
-                File.WriteAllText("optimizer-silent-report.log", _silentReportLog.ToString());
+                File.WriteAllText($"Optimizer.SilentReport.{DateTime.Now.ToString("yyyyMMddTHHmm")}.log", _silentReportLog.ToString());
             }
             catch { }
         }

+ 4 - 4
Optimizer/FontHelper.cs

@@ -59,7 +59,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("FontHelper.ChangeGlobalFont", ex.Message, ex.StackTrace);
+                Logger.LogError("FontHelper.ChangeGlobalFont", ex.Message, ex.StackTrace);
             }
         }
 
@@ -69,12 +69,12 @@ namespace Optimizer
             {
                 using (RegistryKey fontSubstitutesKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes", false))
                 {
-                   return fontSubstitutesKey.GetValue("Segoe UI", string.Empty) as string;
+                    return fontSubstitutesKey.GetValue("Segoe UI", string.Empty) as string;
                 }
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("FontHelper.GetCurrentGlobalFont", ex.Message, ex.StackTrace);
+                Logger.LogError("FontHelper.GetCurrentGlobalFont", ex.Message, ex.StackTrace);
                 return string.Empty;
             }
         }
@@ -114,7 +114,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("FontHelper.RestoreDefaultGlobalFont", ex.Message, ex.StackTrace);
+                Logger.LogError("FontHelper.RestoreDefaultGlobalFont", ex.Message, ex.StackTrace);
             }
         }
     }

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 196 - 214
Optimizer/Forms/MainForm.Designer.cs


+ 31 - 23
Optimizer/Forms/MainForm.cs

@@ -116,7 +116,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("MainForm.CheckForUpdate", ex.Message, ex.StackTrace);
+                Logger.LogError("MainForm.CheckForUpdate", ex.Message, ex.StackTrace);
                 MessageBox.Show(ex.Message, "Optimizer", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
 
@@ -179,7 +179,7 @@ namespace Optimizer
                         }
                         catch (Exception ex)
                         {
-                            ErrorLogger.LogError("MainForm.CheckForUpdate", ex.Message, ex.StackTrace);
+                            Logger.LogError("MainForm.CheckForUpdate", ex.Message, ex.StackTrace);
                             MessageBox.Show(ex.Message);
                         }
                     }
@@ -779,6 +779,7 @@ namespace Optimizer
         public MainForm(SplashForm _splashForm, bool disableIndicium = false, bool disableHostsEditor = false, bool disableCommonApps = false, bool disableUWPApps = false, bool disableStartups = false, bool disableCleaner = false, bool disableIntegrator = false, bool disablePinger = false)
         {
             InitializeComponent();
+            WindowState = FormWindowState.Maximized;
 
             CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("en-US");
             CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo("en-US");
@@ -1041,7 +1042,7 @@ namespace Optimizer
                     catch (Exception ex)
                     {
                         txtDownloadFolder.Text = string.Empty;
-                        ErrorLogger.LogError("MainForm.INIT", ex.Message, ex.StackTrace);
+                        Logger.LogError("MainForm.INIT", ex.Message, ex.StackTrace);
                     }
                 }
                 txtDownloadFolder.Text = Options.CurrentOptions.AppsFolder;
@@ -1073,19 +1074,21 @@ namespace Optimizer
             lblFontsNumber.Text = _availableFonts.Length.ToString();
         }
 
-        private void FixFormSize()
+        private void FixTabHeaderWidth()
         {
-            int desiredWidth = (tabCollection.ItemSize.Width * tabCollection.TabPages.Count) + (Program.DPI_PREFERENCE / 3);
-            int desiredHeight = Convert.ToInt32(desiredWidth / 1.5);
+            if (tabCollection.ItemSize == new Size(0, 0)) return;
 
-            if (desiredWidth > this.Width)
+            int maxTextWidth = 0;
+            for (int i = 0; i < tabCollection.TabPages.Count; i++)
             {
-                this.Width = desiredWidth;
-                this.Height = desiredHeight;
+                var tabWidth = TextRenderer.MeasureText(tabCollection.TabPages[i]?.Text, tabCollection.TabPages[i]?.Font).Width;
+                if (tabWidth > maxTextWidth)
+                {
+                    maxTextWidth = tabWidth;
+                }
             }
 
-            this.MinimumSize = new Size(desiredWidth, desiredHeight);
-            this.CenterToScreen();
+            tabCollection.ItemSize = new Size(maxTextWidth, tabCollection.ItemSize.Height + 10);
         }
 
         private void LoadReadyMenusState()
@@ -2102,7 +2105,7 @@ namespace Optimizer
                         btnDownloadApps.Enabled = false;
                         txtFeedError.Visible = true;
 
-                        ErrorLogger.LogError("MainForm.GetFeed", ex.Message, ex.StackTrace);
+                        Logger.LogError("MainForm.GetFeed", ex.Message, ex.StackTrace);
                     }
                 }
             }
@@ -2111,7 +2114,7 @@ namespace Optimizer
                 btnDownloadApps.Enabled = false;
                 txtFeedError.Visible = true;
 
-                ErrorLogger.LogError("MainForm.GetFeed-DownloadImages", ex.Message, ex.StackTrace);
+                Logger.LogError("MainForm.GetFeed-DownloadImages", ex.Message, ex.StackTrace);
             }
         }
 
@@ -2130,7 +2133,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("MainForm.CleanPC", ex.Message, ex.StackTrace);
+                Logger.LogError("MainForm.CleanPC", ex.Message, ex.StackTrace);
             }
             finally
             {
@@ -2212,7 +2215,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("MainForm.FixRegistry", ex.Message, ex.StackTrace);
+                Logger.LogError("MainForm.FixRegistry", ex.Message, ex.StackTrace);
             }
 
             return changeDetected;
@@ -2301,7 +2304,7 @@ namespace Optimizer
 
         private void Main_Load(object sender, EventArgs e)
         {
-            FixFormSize();
+            FixTabHeaderWidth();
         }
 
         private void GetDesktopItems()
@@ -2358,6 +2361,11 @@ namespace Optimizer
 
                 listStartupItems.Items.Add(list);
             }
+
+            foreach (ColumnHeader column in listStartupItems.Columns)
+            {
+                column.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
+            }
         }
 
         private void GetModernApps(bool showAll)
@@ -3716,7 +3724,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("MainForm.DownloadApp", ex.Message, ex.StackTrace);
+                Logger.LogError("MainForm.DownloadApp", ex.Message, ex.StackTrace);
                 downloadLog += "• " + app.Title + ":" + Environment.NewLine + Options.TranslationList["linkInvalid"] + Environment.NewLine + Environment.NewLine;
 
                 if (pref64) try { File.Delete(Path.Combine(txtDownloadFolder.Text, app.Title + "-x64.exe")); } catch { }
@@ -3807,9 +3815,9 @@ namespace Optimizer
 
         private void btnViewLog_Click(object sender, EventArgs e)
         {
-            if (File.Exists(ErrorLogger.ErrorLogFile))
+            if (File.Exists(Logger.ErrorLogFile))
             {
-                InfoForm iform = new InfoForm(File.ReadAllText(ErrorLogger.ErrorLogFile, Encoding.UTF8));
+                InfoForm iform = new InfoForm(File.ReadAllText(Logger.ErrorLogFile, Encoding.UTF8));
                 iform.ShowDialog();
             }
             else
@@ -3936,7 +3944,7 @@ namespace Optimizer
                 }
                 catch (Exception ex)
                 {
-                    ErrorLogger.LogError("btnExport.Click", ex.Message, ex.StackTrace);
+                    Logger.LogError("btnExport.Click", ex.Message, ex.StackTrace);
                     MessageBox.Show(ex.Message, "Optimizer", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 }
             }
@@ -4090,7 +4098,7 @@ namespace Optimizer
                 }
                 catch (Exception ex)
                 {
-                    ErrorLogger.LogError("MainForm.BackupStartupItems", ex.Message, ex.StackTrace);
+                    Logger.LogError("MainForm.BackupStartupItems", ex.Message, ex.StackTrace);
                 }
             }
         }
@@ -4270,7 +4278,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("MainForm.ParseChangelog", ex.Message, ex.StackTrace);
+                Logger.LogError("MainForm.ParseChangelog", ex.Message, ex.StackTrace);
                 MessageBox.Show(ex.Message, "Optimizer", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 return string.Empty;
             }
@@ -4416,7 +4424,7 @@ namespace Optimizer
             Options.LoadTranslation();
             Translate();
 
-            FixFormSize();
+            FixTabHeaderWidth();
             btnUpdate.Focus();
         }
 

+ 1 - 1
Optimizer/Forms/MainForm.resx

@@ -749,7 +749,7 @@ any application only by typing your desired keyword.</value>
         AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
         LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
         ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAC0
-        GgAAAk1TRnQBSQFMAgEBCQEAAegBDgHoAQ4BIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA
+        GgAAAk1TRnQBSQFMAgEBCQEAAfABDgHwAQ4BIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA
         AwABYAMAAQEBAAEgBgABwP8A/wD/AP8A/wD/AP8A/wAeAANHAYB0//8AiQADRwGAdP//AIkAAyoBQANH
         AYADRwGAA0cBgANHAYADRwGAA0cBgANHAYADRwGAA0cBgANHAYADRwGAA0cBgANHAYADRwGAA0cBgANH
         AYADRwGAA0cBgANHAYADRwGAA0cBgANHAYADRwGAA0cBgANHAYADRwGAA0cBgANHAYADRwGA/wD/AP8A

+ 2 - 2
Optimizer/Forms/StartupRestoreForm.cs

@@ -78,7 +78,7 @@ namespace Optimizer
                     }
                     catch (Exception ex)
                     {
-                        ErrorLogger.LogError("StartupRestoreForm.DeleteStartupBackup", ex.Message, ex.StackTrace);
+                        Logger.LogError("StartupRestoreForm.DeleteStartupBackup", ex.Message, ex.StackTrace);
                     }
 
                     RefreshBackups();
@@ -168,7 +168,7 @@ namespace Optimizer
                         }
                         catch (Exception ex)
                         {
-                            ErrorLogger.LogError("StartupRestoreForm.RestoreStartupBackup", ex.Message, ex.StackTrace);
+                            Logger.LogError("StartupRestoreForm.RestoreStartupBackup", ex.Message, ex.StackTrace);
                         }
                     }
                 }

+ 23 - 99
Optimizer/HostsHelper.cs

@@ -2,7 +2,6 @@
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
-using System.Net;
 using System.Text;
 using System.Text.RegularExpressions;
 using System.Windows.Forms;
@@ -14,16 +13,6 @@ namespace Optimizer
         internal static string NewLine = Environment.NewLine;
         internal static readonly string HostsFile = CleanHelper.System32Folder + "\\drivers\\etc\\hosts";
 
-        //static string AdBlockBasicLink = "https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts";
-        //static string AdBlockWithPornLink = "https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts";
-        //static string AdBlockWithSocialLink = "https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts";
-        //static string AdBlockUltimateLink = "https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts";
-
-        static WebClient _client = new WebClient()
-        {
-            Encoding = Encoding.UTF8
-        };
-
         internal static void RestoreDefaultHosts()
         {
             try
@@ -37,83 +26,11 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("HostsHelper.RestoreDefaultHosts", ex.Message, ex.StackTrace);
+                Logger.LogError("HostsHelper.RestoreDefaultHosts", ex.Message, ex.StackTrace);
                 MessageBox.Show(Options.TranslationList("dnsCacheM").ToString(), "Optimizer", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
         }
 
-        //internal static void AdblockBasic()
-        //{
-        //    try
-        //    {
-        //        if (File.Exists(HostsFile))
-        //        {
-        //            File.Delete(HostsFile);
-        //        }
-
-        //        File.WriteAllText(HostsFile, _client.DownloadString(AdBlockBasicLink));
-        //    }
-        //    catch (Exception ex)
-        //    {
-        //        ErrorLogger.LogError("HostsHelper.AdblockBasic", ex.Message, ex.StackTrace);
-        //        MessageBox.Show(Options.TranslationList("dnsCacheM").ToString(), "DNS Cache is running", MessageBoxButtons.OK, MessageBoxIcon.Information);
-        //    }
-        //}
-
-        //internal static void AdBlockWithPorn()
-        //{
-        //    try
-        //    {
-        //        if (File.Exists(HostsFile))
-        //        {
-        //            File.Delete(HostsFile);
-        //        }
-
-        //        File.WriteAllText(HostsFile, _client.DownloadString(AdBlockWithPornLink));
-        //    }
-        //    catch (Exception ex)
-        //    {
-        //        ErrorLogger.LogError("HostsHelper.AdBlockWithPorn", ex.Message, ex.StackTrace);
-        //        MessageBox.Show(Options.TranslationList("dnsCacheM").ToString(), "DNS Cache is running", MessageBoxButtons.OK, MessageBoxIcon.Information);
-        //    }
-        //}
-
-        //internal static void AdBlockWithSocial()
-        //{
-        //    try
-        //    {
-        //        if (File.Exists(HostsFile))
-        //        {
-        //            File.Delete(HostsFile);
-        //        }
-
-        //        File.WriteAllText(HostsFile, _client.DownloadString(AdBlockWithSocialLink));
-        //    }
-        //    catch (Exception ex)
-        //    {
-        //        ErrorLogger.LogError("HostsHelper.AdBlockWithSocial", ex.Message, ex.StackTrace);
-        //        MessageBox.Show(Options.TranslationList("dnsCacheM").ToString(), "DNS Cache is running", MessageBoxButtons.OK, MessageBoxIcon.Information);
-        //    }
-        //}
-
-        //internal static void AdBlockUltimate()
-        //{
-        //    try
-        //    {
-        //        if (File.Exists(HostsFile))
-        //        {
-        //            File.Delete(HostsFile);
-        //        }
-
-        //        File.WriteAllText(HostsFile, _client.DownloadString(AdBlockUltimateLink));
-        //    }
-        //    catch (Exception ex)
-        //    {
-        //        ErrorLogger.LogError("HostsHelper.AdBlockUltimate", ex.Message, ex.StackTrace);
-        //        MessageBox.Show(Options.TranslationList("dnsCacheM").ToString(), "DNS Cache is running", MessageBoxButtons.OK, MessageBoxIcon.Information);
-        //    }
-        //}
-
         internal static string[] ReadHosts()
         {
             StringBuilder sb = new StringBuilder();
@@ -127,7 +44,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("HostsHelper.ReadHosts", ex.Message, ex.StackTrace);
+                Logger.LogError("HostsHelper.ReadHosts", ex.Message, ex.StackTrace);
             }
 
             return sb.ToString().Split(Environment.NewLine.ToCharArray());
@@ -147,7 +64,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("HostsHelper.ReadHostsFast", ex.Message, ex.StackTrace);
+                Logger.LogError("HostsHelper.ReadHostsFast", ex.Message, ex.StackTrace);
             }
 
             return sb.ToString();
@@ -175,7 +92,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("HostsHelper.SaveHosts", ex.Message, ex.StackTrace);
+                Logger.LogError("HostsHelper.SaveHosts", ex.Message, ex.StackTrace);
                 MessageBox.Show(Options.TranslationList("dnsCacheM").ToString(), "DNS Cache is running", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
         }
@@ -198,20 +115,15 @@ namespace Optimizer
             return entries;
         }
 
-        internal static void AddEntry(string entry, string comment = null)
+        internal static void AddEntry(string entry)
         {
             try
             {
-                if (string.IsNullOrEmpty(comment))
-                {
-                    File.AppendAllText(HostsFile, NewLine + $"{entry}");
-                    return;
-                }
-                File.AppendAllText(HostsFile, NewLine + $"{entry} #{comment}");
+                File.AppendAllText(HostsFile, NewLine + $"{entry}");
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("HostsHelper.AddEntry", ex.Message, ex.StackTrace);
+                Logger.LogError("HostsHelper.AddEntry", ex.Message, ex.StackTrace);
                 MessageBox.Show(Options.TranslationList("dnsCacheM").ToString(), "DNS Cache is running", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
         }
@@ -224,11 +136,23 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("HostsHelper.RemoveEntry", ex.Message, ex.StackTrace);
+                Logger.LogError("HostsHelper.RemoveEntry", ex.Message, ex.StackTrace);
                 MessageBox.Show(Options.TranslationList("dnsCacheM").ToString(), "DNS Cache is running", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
         }
 
+        internal static void RemoveEntryFromTemplate(string domain)
+        {
+            try
+            {
+                File.WriteAllLines(HostsFile, File.ReadLines(HostsFile).Where(x => !x.Contains(domain)).ToList());
+            }
+            catch (Exception ex)
+            {
+                Logger.LogError("HostsHelper.RemoveEntryFromTemplate", ex.Message, ex.StackTrace);
+            }
+        }
+
         internal static void RemoveAllEntries(List<string> collection)
         {
             try
@@ -240,7 +164,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("HostsHelper.RemoveAllEntries", ex.Message, ex.StackTrace);
+                Logger.LogError("HostsHelper.RemoveAllEntries", ex.Message, ex.StackTrace);
                 MessageBox.Show(Options.TranslationList("dnsCacheM").ToString(), "DNS Cache is running", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
         }
@@ -259,7 +183,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("HostsHelper.ReadOnly", ex.Message, ex.StackTrace);
+                Logger.LogError("HostsHelper.ReadOnly", ex.Message, ex.StackTrace);
                 return false;
             }
         }
@@ -274,7 +198,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("HostsHelper.ReadOnly", ex.Message, ex.StackTrace);
+                Logger.LogError("HostsHelper.ReadOnly", ex.Message, ex.StackTrace);
             }
         }
     }

+ 11 - 11
Optimizer/IndiciumHelper.cs

@@ -73,7 +73,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("IndiciumHelper.GetCPUs", ex.Message, ex.StackTrace);
+                Logger.LogError("IndiciumHelper.GetCPUs", ex.Message, ex.StackTrace);
             }
 
             return CPUs;
@@ -103,7 +103,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("IndiciumHelper.GetVM", ex.Message, ex.StackTrace);
+                Logger.LogError("IndiciumHelper.GetVM", ex.Message, ex.StackTrace);
             }
 
             return vm;
@@ -135,7 +135,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("IndiciumHelper.GetRAM", ex.Message, ex.StackTrace);
+                Logger.LogError("IndiciumHelper.GetRAM", ex.Message, ex.StackTrace);
             }
 
             return modules;
@@ -202,7 +202,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("IndiciumHelper.GetMotherboards", ex.Message, ex.StackTrace);
+                Logger.LogError("IndiciumHelper.GetMotherboards", ex.Message, ex.StackTrace);
             }
 
             return mobos;
@@ -230,7 +230,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("IndiciumHelper.GetDisks", ex.Message, ex.StackTrace);
+                Logger.LogError("IndiciumHelper.GetDisks", ex.Message, ex.StackTrace);
             }
 
             return disks;
@@ -275,7 +275,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("IndiciumHelper.GetVolumes", ex.Message, ex.StackTrace);
+                Logger.LogError("IndiciumHelper.GetVolumes", ex.Message, ex.StackTrace);
             }
         }
 
@@ -300,7 +300,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("IndiciumHelper.GetKeyboards", ex.Message, ex.StackTrace);
+                Logger.LogError("IndiciumHelper.GetKeyboards", ex.Message, ex.StackTrace);
             }
 
             try
@@ -327,7 +327,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("IndiciumHelper.GetPointingDevices", ex.Message, ex.StackTrace);
+                Logger.LogError("IndiciumHelper.GetPointingDevices", ex.Message, ex.StackTrace);
             }
         }
 
@@ -356,7 +356,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("IndiciumHelper.GetGPUs", ex.Message, ex.StackTrace);
+                Logger.LogError("IndiciumHelper.GetGPUs", ex.Message, ex.StackTrace);
             }
 
             return GPUs;
@@ -391,7 +391,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("IndiciumHelper.GetNetworkAdapters", ex.Message, ex.StackTrace);
+                Logger.LogError("IndiciumHelper.GetNetworkAdapters", ex.Message, ex.StackTrace);
             }
         }
 
@@ -415,7 +415,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("IndiciumHelper.GetAudioDevices", ex.Message, ex.StackTrace);
+                Logger.LogError("IndiciumHelper.GetAudioDevices", ex.Message, ex.StackTrace);
             }
 
             return audioDevices;

+ 9 - 9
Optimizer/IntegratorHelper.cs

@@ -92,13 +92,13 @@ namespace Optimizer
                     }
                     catch (Exception ex)
                     {
-                        ErrorLogger.LogError("Integrator.RemoveItem", ex.Message, ex.StackTrace);
+                        Logger.LogError("Integrator.RemoveItem", ex.Message, ex.StackTrace);
                     }
                 }
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Integrator.RemoveItem", ex.Message, ex.StackTrace);
+                Logger.LogError("Integrator.RemoveItem", ex.Message, ex.StackTrace);
             }
         }
 
@@ -110,7 +110,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Integrator.ItemExists", ex.Message, ex.StackTrace);
+                Logger.LogError("Integrator.ItemExists", ex.Message, ex.StackTrace);
                 return false;
             }
         }
@@ -123,7 +123,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Integrator.TakeOwnershipExists", ex.Message, ex.StackTrace);
+                Logger.LogError("Integrator.TakeOwnershipExists", ex.Message, ex.StackTrace);
                 return false;
             }
         }
@@ -136,7 +136,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Integrator.OpenWithCMDExists", ex.Message, ex.StackTrace);
+                Logger.LogError("Integrator.OpenWithCMDExists", ex.Message, ex.StackTrace);
                 return false;
             }
         }
@@ -153,7 +153,7 @@ namespace Optimizer
                     }
                     catch (Exception ex)
                     {
-                        ErrorLogger.LogError("Integrator.RemoveAllItems", ex.Message, ex.StackTrace);
+                        Logger.LogError("Integrator.RemoveAllItems", ex.Message, ex.StackTrace);
                     }
                 }
             }
@@ -193,7 +193,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Integrator.DownloadFavicon", ex.Message, ex.StackTrace);
+                Logger.LogError("Integrator.DownloadFavicon", ex.Message, ex.StackTrace);
             }
 
             return favicon;
@@ -268,7 +268,7 @@ namespace Optimizer
                 }
                 catch (Exception ex)
                 {
-                    ErrorLogger.LogError("Integrator.TakeOwnership", ex.Message, ex.StackTrace);
+                    Logger.LogError("Integrator.TakeOwnership", ex.Message, ex.StackTrace);
                 }
             }
             if (!File.Exists(CoreHelper.ReadyMadeMenusFolder + "RemoveTakeOwnership.reg"))
@@ -279,7 +279,7 @@ namespace Optimizer
                 }
                 catch (Exception ex)
                 {
-                    ErrorLogger.LogError("Integrator.TakeOwnership", ex.Message, ex.StackTrace);
+                    Logger.LogError("Integrator.TakeOwnership", ex.Message, ex.StackTrace);
                 }
             }
 

+ 16 - 14
Optimizer/OptimizeHelper.cs

@@ -148,7 +148,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Optimize.DisablePerformanceTweaks", ex.Message, ex.StackTrace);
+                Logger.LogError("Optimize.DisablePerformanceTweaks", ex.Message, ex.StackTrace);
             }
         }
 
@@ -240,7 +240,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Optimize.EnableNetworkThrottling", ex.Message, ex.StackTrace);
+                Logger.LogError("Optimize.EnableNetworkThrottling", ex.Message, ex.StackTrace);
             }
         }
 
@@ -268,6 +268,7 @@ namespace Optimizer
             Utilities.StopService("HomeGroupListener");
             Utilities.StopService("HomeGroupProvider");
 
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\HomeGroup", "DisableHomeGroup", "1", RegistryValueKind.DWord);
             Registry.SetValue("HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\HomeGroupListener", "Start", "4", RegistryValueKind.DWord);
             Registry.SetValue("HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\HomeGroupProvider", "Start", "4", RegistryValueKind.DWord);
         }
@@ -276,6 +277,7 @@ namespace Optimizer
         {
             Registry.SetValue("HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\HomeGroupListener", "Start", "2", RegistryValueKind.DWord);
             Registry.SetValue("HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\HomeGroupProvider", "Start", "2", RegistryValueKind.DWord);
+            Utilities.TryDeleteRegistryValue(true, @"SOFTWARE\Policies\Microsoft\Windows\HomeGroup", "DisableHomeGroup");
 
             Utilities.StartService("HomeGroupListener");
             Utilities.StartService("HomeGroupProvider");
@@ -347,7 +349,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Optimize.DisableSystemRestore", ex.Message, ex.StackTrace);
+                Logger.LogError("Optimize.DisableSystemRestore", ex.Message, ex.StackTrace);
             }
 
             Utilities.StopService("VSS");
@@ -582,7 +584,7 @@ namespace Optimizer
                     }
                     catch (Exception ex)
                     {
-                        ErrorLogger.LogError("Optimize.UninstallOneDrive", ex.Message, ex.StackTrace);
+                        Logger.LogError("Optimize.UninstallOneDrive", ex.Message, ex.StackTrace);
                     }
                 }
             }
@@ -640,7 +642,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Optimize.UninstallOneDrive", ex.Message, ex.StackTrace);
+                Logger.LogError("Optimize.UninstallOneDrive", ex.Message, ex.StackTrace);
             }
         }
 
@@ -671,7 +673,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Optimize.InstallOneDrive", ex.Message, ex.StackTrace);
+                Logger.LogError("Optimize.InstallOneDrive", ex.Message, ex.StackTrace);
             }
         }
 
@@ -758,7 +760,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Optimize.EnableXboxLive", ex.Message, ex.StackTrace);
+                Logger.LogError("Optimize.EnableXboxLive", ex.Message, ex.StackTrace);
             }
 
             Utilities.RunBatchFile(CoreHelper.ScriptsFolder + "EnableXboxTasks.bat");
@@ -875,7 +877,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Optimize.EnableTelemetryTasks", ex.Message, ex.StackTrace);
+                Logger.LogError("Optimize.EnableTelemetryTasks", ex.Message, ex.StackTrace);
             }
 
             Utilities.RunBatchFile(CoreHelper.ScriptsFolder + "EnableTelemetryTasks.bat");
@@ -897,7 +899,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Optimize.DisableOffice2016Telemetry", ex.Message, ex.StackTrace);
+                Logger.LogError("Optimize.DisableOffice2016Telemetry", ex.Message, ex.StackTrace);
             }
 
             Utilities.RunBatchFile(CoreHelper.ScriptsFolder + "DisableOfficeTelemetryTasks.bat");
@@ -920,7 +922,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Optimize.EnableOffice2016Telemetry", ex.Message, ex.StackTrace);
+                Logger.LogError("Optimize.EnableOffice2016Telemetry", ex.Message, ex.StackTrace);
             }
 
             Utilities.RunBatchFile(CoreHelper.ScriptsFolder + "EnableOfficeTelemetryTasks.bat");
@@ -1524,7 +1526,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Optimize.RemoveCastToDevice", ex.Message, ex.StackTrace);
+                Logger.LogError("Optimize.RemoveCastToDevice", ex.Message, ex.StackTrace);
             }
         }
 
@@ -1537,7 +1539,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Optimize.AddCastToDevice", ex.Message, ex.StackTrace);
+                Logger.LogError("Optimize.AddCastToDevice", ex.Message, ex.StackTrace);
             }
         }
 
@@ -1788,7 +1790,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Optimize.DisableVisualStudioTelemetry", ex.Message, ex.StackTrace);
+                Logger.LogError("Optimize.DisableVisualStudioTelemetry", ex.Message, ex.StackTrace);
             }
         }
 
@@ -1820,7 +1822,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Optimize.EnableVisualStudioTelemetry", ex.Message, ex.StackTrace);
+                Logger.LogError("Optimize.EnableVisualStudioTelemetry", ex.Message, ex.StackTrace);
             }
         }
 

+ 1 - 1
Optimizer/Options.cs

@@ -355,7 +355,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Options.LoadTranslation", ex.Message, ex.StackTrace);
+                Logger.LogError("Options.LoadTranslation", ex.Message, ex.StackTrace);
                 TranslationList = JObject.Parse(Properties.Resources.EN);
             }
         }

+ 2 - 2
Optimizer/PingerHelper.cs

@@ -66,7 +66,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("PingerHelper.GetActiveNetworkAdapters", ex.Message, ex.StackTrace);
+                Logger.LogError("PingerHelper.GetActiveNetworkAdapters", ex.Message, ex.StackTrace);
                 return null;
             }
 
@@ -81,7 +81,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("PingerHelper.GetDNSFromNetworkAdapter", ex.Message, ex.StackTrace);
+                Logger.LogError("PingerHelper.GetDNSFromNetworkAdapter", ex.Message, ex.StackTrace);
                 return null;
             }
         }

+ 4 - 3
Optimizer/Program.cs

@@ -14,7 +14,7 @@ namespace Optimizer
         /* DO NOT LEAVE THEM EMPTY */
 
         internal readonly static float Major = 15;
-        internal readonly static float Minor = 6;
+        internal readonly static float Minor = 7;
 
         internal readonly static bool EXPERIMENTAL_BUILD = false;
         internal static bool SILENT_MODE = false;
@@ -238,6 +238,7 @@ namespace Optimizer
 
                 if (arg.StartsWith("/config="))
                 {
+                    UNSAFE_MODE = true;
                     string fileName = arg.Replace("/config=", string.Empty);
 
                     if (!File.Exists(fileName))
@@ -276,7 +277,7 @@ namespace Optimizer
         private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
         {
             Exception error = (Exception)e.ExceptionObject;
-            ErrorLogger.LogError("Program.Main-UnhandledException", error.Message, error.StackTrace);
+            Logger.LogError("Program.Main-UnhandledException", error.Message, error.StackTrace);
         }
 
         private static void LoadSettings()
@@ -318,7 +319,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Program.Main-LoadSettings", ex.Message, ex.StackTrace);
+                Logger.LogError("Program.Main-LoadSettings", ex.Message, ex.StackTrace);
                 Environment.Exit(0);
             }
         }

+ 7 - 7
Optimizer/Resources/i18n/AR.json

@@ -452,11 +452,11 @@
 	"btnRestart": "أعد التشغيل في الوضع العاديe",
 	"btnRestartDisableDefender": "عادة تشغيل && تعطيل Defender",
 	"classicPhotoViewerSw": "استعادة عارض الصور الكلاسيكي",
-	"tabPage3": "Fonts",
-	"fontSetTitle": "Set your favorite font as Windows default font",
-	"label11": "Current font:",
-	"btnSetGlobalFont": "Set as default",
-	"lblFontsCount": "Available fonts:",
-	"btnRestoreFont": "Restore default",
-	"btnRefreshFonts": "Refresh"
+	"tabPage3": "الخطوط",
+	"fontSetTitle": "قم بتعيين الخط المفضل لديك كخط افتراضي في Windows",
+	"label11": "الخط الحالي:",
+	"btnSetGlobalFont": "تعيين كافتراضي",
+	"lblFontsCount": "الخطوط المتوفرة:",
+	"btnRestoreFont": "استعادة الافتراضي",
+	"btnRefreshFonts": "تحديث"
 }

+ 8 - 1
Optimizer/Resources/i18n/CN.json

@@ -450,5 +450,12 @@
 	"btnRestartSafe": "以安全模式重启",
 	"btnRestart": "以正常模式重启",
 	"btnRestartDisableDefender": "重新启动 && 禁用 Defender",
-	"classicPhotoViewerSw": "恢复经典照片查看器"
+	"classicPhotoViewerSw": "恢复经典照片查看器",
+	"tabPage3": "字体",
+	"fontSetTitle": "将您喜欢的字体设置为 Windows 默认字体",
+	"label11": "当前字体:",
+	"btnSetGlobalFont": "设置为默认",
+	"lblFontsCount": "可用字体:",
+	"btnRestoreFont": "恢复为默认",
+	"btnRefreshFonts": "刷新"
 }

+ 8 - 1
Optimizer/Resources/i18n/CZ.json

@@ -451,5 +451,12 @@ Má to negativní vliv na výkon.",
 	"btnRestartSafe": "Restartujte v nouzovém režimu",
 	"btnRestart": "Restartujte v normálním režimue",
 	"btnRestartDisableDefender": "Restartujte && Deaktivujte Defender",
-	"classicPhotoViewerSw": "Obnovte klasický prohlížeč fotografií"
+	"classicPhotoViewerSw": "Obnovte klasický prohlížeč fotografií",
+	"tabPage3": "Písma",
+	"fontSetTitle": "Nastavit své oblíbené písmo jako výchozí písmo systému Windows",
+	"label11": "Aktuální písmo:",
+	"btnSetGlobalFont": "Nastavit jako výchozí",
+	"lblFontsCount": "Dostupné písma:",
+	"btnRestoreFont": "Obnovit výchozí",
+	"btnRefreshFonts": "Obnovit"
 }

+ 8 - 1
Optimizer/Resources/i18n/DE.json

@@ -425,5 +425,12 @@
 	"btnRestartSafe": "Neustart im abgesicherten Modus",
 	"btnRestart": "Neustart im Normalmodus",
 	"btnRestartDisableDefender": "Neustart && Defender deaktivieren",
-	"classicPhotoViewerSw": "Stellen Sie den klassischen Fotobetrachter wieder her"
+	"classicPhotoViewerSw": "Stellen Sie den klassischen Fotobetrachter wieder her",
+	"tabPage3": "Schriftarten",
+	"fontSetTitle": "Legen Sie Ihre Lieblingsschrift als Windows-Standard fest",
+	"label11": "Aktuelle Schrift:",
+	"btnSetGlobalFont": "Als Standard festlegen",
+	"lblFontsCount": "Verfügbare Schriftarten:",
+	"btnRestoreFont": "Standard wiederherstellen",
+	"btnRefreshFonts": "Aktualisieren"
 }

+ 8 - 1
Optimizer/Resources/i18n/ES.json

@@ -448,5 +448,12 @@ Tiene un efecto negativo en el rendimiento.",
 	"btnRestartSafe": "Reiniciar en modo seguro",
 	"btnRestart": "Reiniciar en modo normal",
 	"btnRestartDisableDefender": "Reiniciar && Desactivar Defender",
-	"classicPhotoViewerSw": "Restaurar visor de fotos clásico"
+	"classicPhotoViewerSw": "Restaurar visor de fotos clásico",
+	"tabPage3": "Fuentes",
+	"fontSetTitle": "Establezca su fuente favorita como fuente predeterminada de Windows",
+	"label11": "Fuente actual:",
+	"btnSetGlobalFont": "Establecer como predeterminada",
+	"lblFontsCount": "Fuentes disponibles:",
+	"btnRestoreFont": "Restaurar predeterminado",
+	"btnRefreshFonts": "Actualizar"
 }

+ 8 - 1
Optimizer/Resources/i18n/FA.json

@@ -438,5 +438,12 @@
 	"btnRestartSafe": "راه اندازی مجدد در حالت ایمن",
 	"btnRestart": "راه اندازی مجدد در حالت معمولی",
 	"btnRestartDisableDefender": "راه اندازی مجدد && غیرفعال کردن Defender",
-	"classicPhotoViewerSw": "باز گرداندن Photo Viewer قدیمی"
+	"classicPhotoViewerSw": "باز گرداندن Photo Viewer قدیمی",
+	"tabPage3": "فونت",
+	"fontSetTitle": "فونت مورد علاقه خود را به عنوان فونت پیش فرض ویندوز تنظیم کنید",
+	"label11": "فونت های موجود:",
+	"btnSetGlobalFont": "تنظیم به عنوان پیش فرض",
+	"lblFontsCount": "فونت فعلی:",
+	"btnRestoreFont": "برگشت به حالت پیشفرض",
+	"btnRefreshFonts": "بارگذاری مجدد"
 }

+ 8 - 1
Optimizer/Resources/i18n/FR.json

@@ -425,5 +425,12 @@ Necessite l'ouverture d'un compte Microsoft.",
 	"btnRestartSafe": "Redémarrer en mode sans échec",
 	"btnRestart": "Redémarrer en mode normal",
 	"btnRestartDisableDefender": "Redémarrer et désactiver Defender",
-	"classicPhotoViewerSw": "Restaurer la visionneuse de photos classique"
+	"classicPhotoViewerSw": "Restaurer la visionneuse de photos classique",
+	"tabPage3": "Polices",
+	"fontSetTitle": "Définir votre police préférée comme police par défaut de Windows",
+	"label11": "Police actuelle:",
+	"btnSetGlobalFont": "Définir par défaut",
+	"lblFontsCount": "Polices disponibles:",
+	"btnRestoreFont": "Retablir les valeurs par defaut",
+	"btnRefreshFonts": "Rafraichir"
 }

+ 8 - 1
Optimizer/Resources/i18n/HU.json

@@ -451,5 +451,12 @@ Negatív hatással van a teljesítményre.",
 	"btnRestartSafe": "Indítsa újra csökkentett módban",
 	"btnRestart": "Indítsa újra normál módban",
 	"btnRestartDisableDefender": "Indítsa újra és tiltsa le a Defendert",
-	"classicPhotoViewerSw": "A klasszikus fényképnézegető visszaállítása"
+	"classicPhotoViewerSw": "A klasszikus fényképnézegető visszaállítása",
+	"tabPage3": "Betűtípusok",
+	"fontSetTitle": "Állítsa be kedvenc betűtípusát a Windows alapértelmezett betűtípusaként",
+	"label11": "Jelenlegi betűtípus:",
+	"btnSetGlobalFont": "Beállítás alapértelmezettként",
+	"lblFontsCount": "Elérhető betűtípusok:",
+	"btnRestoreFont": "Alapértelmezett visszaállítása",
+	"btnRefreshFonts": "Frissítés"
 }

+ 8 - 1
Optimizer/Resources/i18n/IT.json

@@ -445,5 +445,12 @@ Ha un effetto negativo sulle prestazioni.",
 	"btnRestartSafe": "Riavvia in modalità provvisoria",
 	"btnRestart": "Riavvia in modalità normale",
 	"btnRestartDisableDefender": "Riavvia && Disabilita Defender",
-	"classicPhotoViewerSw": "Ripristina il visualizzatore di foto classico"
+	"classicPhotoViewerSw": "Ripristina il visualizzatore di foto classico",
+	"tabPage3": "Caratteri",
+	"fontSetTitle": "Imposta il tuo carattere preferito come carattere predefinito di Windows",
+	"label11": "Carattere corrente:",
+	"btnSetGlobalFont": "Imposta come predefinito",
+	"lblFontsCount": "Caratteri disponibili:",
+	"btnRestoreFont": "Riprista predefinito",
+	"btnRefreshFonts": "Aggiorna"
 }

+ 8 - 1
Optimizer/Resources/i18n/JA.json

@@ -442,5 +442,12 @@ SMBv3に置き換えられており、そちらのほうがより安全です。
 	"btnRestartSafe": "セーフモードで再起動",
 	"btnRestart": "通常モードで再起動",
 	"btnRestartDisableDefender": "Defender を再起動 && 無効化",
-	"classicPhotoViewerSw": "クラシックフォトビューアを復元する"
+	"classicPhotoViewerSw": "クラシックフォトビューアを復元する",
+	"tabPage3": "フォント",
+	"fontSetTitle": "お気に入りのフォントを Windows のデフォルト フォントとして設定",
+	"label11": "現在のフォント:",
+	"btnSetGlobalFont": "デフォルトとして設定",
+	"lblFontsCount": "利用可能なフォント:",
+	"btnRestoreFont": "デフォルトを復元",
+	"btnRefreshFonts": "更新"
 }

+ 8 - 1
Optimizer/Resources/i18n/KO.json

@@ -453,5 +453,12 @@ Microsoft 계정 로그인이 필요합니다.",
 	"btnRestartDisableDefender": "Defender 다시 시작 및 사용 안 함",
 	"storeUpdatesSw": "Microsoft Store 업데이트 비활성화",
 	"storeUpdatesTip": "Microsoft Store 자동 업데이트 기능을 비활성화합니다.",
-	"classicPhotoViewerSw": "클래식 사진 뷰어 복원"
+	"classicPhotoViewerSw": "클래식 사진 뷰어 복원",
+	"tabPage3": "글꼴",
+	"fontSetTitle": "즐겨찾는 글꼴을 Windows 기본 글꼴로 설정",
+	"label11": "현재 글꼴:",
+	"btnSetGlobalFont": "기본값으로 설정",
+	"lblFontsCount": "사용 가능한 글꼴:",
+	"btnRestoreFont": "기본값 복원",
+	"btnRefreshFonts": "새로 고침"
 }

+ 8 - 1
Optimizer/Resources/i18n/KU.json

@@ -450,5 +450,12 @@
 	"btnRestartSafe": "لە دۆخی سەلامەتدا دووبارە دەستپێبکەرەوە",
 	"btnRestart": "لە دۆخی ئاساییدا دووبارە دەستپێبکەرەوە",
 	"btnRestartDisableDefender": "دووبارە دەستپێکردنەوە && لەکارخستنی بەرگریکار",
-	"classicPhotoViewerSw": "گەڕاندنەوەی بینەری وێنەی کلاسیک"
+	"classicPhotoViewerSw": "گەڕاندنەوەی بینەری وێنەی کلاسیک",
+	"tabPage3": "فۆنتەکانی ئێستا",
+	"fontSetTitle": "فۆنتەکانی دڵخوازت وەک فۆنتەکانی پێشوەختەی ویندۆز دابنێ",
+	"label11": "فۆنتەکانی بەردەست:",
+	"btnSetGlobalFont": "وەک پێشوەختە ڕێکبخە",
+	"lblFontsCount": "فۆنتەکانی بەردەست:",
+	"btnRestoreFont": "گەڕاندنەوەی بنەڕەت",
+	"btnRefreshFonts": "ڕیفرێش"
 }

+ 8 - 1
Optimizer/Resources/i18n/NL.json

@@ -402,5 +402,12 @@ Het heeft een negatief effect op de prestaties.",
 	"btnRestartSafe": "Start opnieuw op in Veilige modus",
 	"btnRestart": "Start opnieuw op in de normale modus",
 	"btnRestartDisableDefender": "Herstart && Schakel Defender uit",
-   "classicPhotoViewerSw": "Herstel klassieke fotoviewer"
+   "classicPhotoViewerSw": "Herstel klassieke fotoviewer",
+   "tabPage3": "Lettertypen",
+	"fontSetTitle": "Stel uw favoriete lettertype in als standaardlettertype van Windows",
+	"label11": "Huidig ​​lettertype:",
+	"btnSetGlobalFont": "Stel in als standaardlettertype",
+	"lblFontsCount": "Beschikbare lettertypen:",
+	"btnRestoreFont": "Standaard herstellen",
+	"btnRefreshFonts": "Ververs"
 }

+ 8 - 1
Optimizer/Resources/i18n/PL.json

@@ -420,5 +420,12 @@
 	"btnRestartSafe": "Uruchom ponownie w trybie awaryjnym",
 	"btnRestart": "Uruchom ponownie w trybie normalnym",
 	"btnRestartDisableDefender": "Uruchom ponownie i wyłącz program Defender",
-	"classicPhotoViewerSw": "Przywróć klasyczną przeglądarkę zdjęć"
+	"classicPhotoViewerSw": "Przywróć klasyczną przeglądarkę zdjęć",
+	"tabPage3": "Czcionki",
+	"fontSetTitle": "Ustaw swoją ulubioną czcionkę jako domyślną czcionkę systemu Windows",
+	"label11": "Bieżąca czcionka:",
+	"btnSetGlobalFont": "Ustaw jako domyślną",
+	"lblFontsCount": "Dostępne czcionki:",
+	"btnRestoreFont": "Przywróć wartości domyślne",
+	"btnRefreshFonts": "Odśwież"
 }

+ 8 - 1
Optimizer/Resources/i18n/PT.json

@@ -448,5 +448,12 @@ Tem efeito negativo no desempenho.",
 	"btnRestartSafe": "Reiniciar no modo de segurança",
 	"btnRestart": "Reiniciar no modo normal",
 	"btnRestartDisableDefender": "Reiniciar && Desativar Defender",
-	"classicPhotoViewerSw": "Restaurar visualizador de fotos clássico"
+	"classicPhotoViewerSw": "Restaurar visualizador de fotos clássico",
+	"tabPage3": "Fontes",
+	"fontSetTitle": "Defina sua fonte favorita como fonte padrão do Windows",
+	"label11": "Fonte atual:",
+	"btnSetGlobalFont": "Definir como padrão",
+	"lblFontsCount": "Fontes disponíveis:",
+	"btnRestoreFont": "Restaurar para o padrão",
+	"btnRefreshFonts": "Atualizar"
 }

+ 8 - 1
Optimizer/Resources/i18n/RO.json

@@ -433,5 +433,12 @@
 	"btnRestartSafe": "Reporniți în modul sigur",
 	"btnRestart": "Reporniți în modul normal",
 	"btnRestartDisableDefender": "Reporniți && Dezactivați Defender",
-	"classicPhotoViewerSw": "Restaurați vizualizatorul foto clasic"
+	"classicPhotoViewerSw": "Restaurați vizualizatorul foto clasic",
+	"tabPage3": "Fonturi",
+	"fontSetTitle": "Setați fontul preferat ca font implicit Windows",
+	"label11": "Font curent:",
+	"btnSetGlobalFont": "Set as default",
+	"lblFontsCount": "Setați ca implicit:",
+	"btnRestoreFont": "Restaurati Setariile implicite",
+	"btnRefreshFonts": "Reîmprospăteaza"
 }

+ 8 - 1
Optimizer/Resources/i18n/RU.json

@@ -421,5 +421,12 @@
 	"btnRestartSafe": "Перезапустите в безопасном режиме",
 	"btnRestart": "Перезапустите в обычном режиме",
 	"btnRestartDisableDefender": "Перезапустить и отключить Защитник",
-	"classicPhotoViewerSw": "Восстановить классический просмотрщик фотографий"
+	"classicPhotoViewerSw": "Восстановить классический просмотрщик фотографий",
+	"tabPage3": "Шрифты",
+	"fontSetTitle": "Установите ваш любимый шрифт в качестве шрифта Windows по умолчанию",
+	"label11": "Текущий шрифт:",
+	"btnSetGlobalFont": "Установите по умолчанию",
+	"lblFontsCount": "Доступные шрифты:",
+	"btnRestoreFont": "Восстановить по умолчанию",
+	"btnRefreshFonts": "Обновить"
 }

+ 8 - 1
Optimizer/Resources/i18n/TR.json

@@ -449,5 +449,12 @@ Performansa olumsuz etkisi vardır.",
 	"btnRestartSafe": "Güvenli Modda Yeniden Başlatın",
 	"btnRestart": "Normal Modda Yeniden Başlat",
 	"btnRestartDisableDefender": "Yeniden Başlat && Defender'ı Devre Dışı Bırak",
-	"classicPhotoViewerSw": "Klasik Fotoğraf Görüntüleyiciyi Geri Yükle"
+	"classicPhotoViewerSw": "Klasik Fotoğraf Görüntüleyiciyi Geri Yükle",
+	"tabPage3": "Yazı Tipleri",
+	"fontSetTitle": "Favori yazı tipinizi Windows varsayılan yazı tipi olarak ayarlayın",
+	"label11": "Geçerli yazı tipi:",
+	"btnSetGlobalFont": "Varsayılan olarak ayarla",
+	"lblFontsCount": "Kullanılabilir yazı tipleri:",
+	"btnRestoreFont": "Varsayılana Döndür",
+	"btnRefreshFonts": "Yenile"
 }

+ 8 - 1
Optimizer/Resources/i18n/TW.json

@@ -447,5 +447,12 @@
 	"btnRestartSafe": "以安全模式重新啟動",
 	"btnRestart": "以正常模式重新啟動",
 	"btnRestartDisableDefender": "重新啟動並停用 Defender",
-	"classicPhotoViewerSw": "還原傳統相片檢視器"
+	"classicPhotoViewerSw": "還原傳統相片檢視器",
+	"tabPage3": "字体",
+	"fontSetTitle": "将您喜欢的字体设置为 Windows 默认字体",
+	"label11": "当前字体:",
+	"btnSetGlobalFont": "设置为默认",
+	"lblFontsCount": "可用字体:",
+	"btnRestoreFont": "還原預設值",
+	"btnRefreshFonts": "重新整理"
 }

+ 8 - 1
Optimizer/Resources/i18n/UA.json

@@ -453,5 +453,12 @@
 	"btnRestartSafe": "Перезапустіть у безпечному режимі",
 	"btnRestart": "Перезапустіть у звичайному режимі",
 	"btnRestartDisableDefender": "Перезапустіть && Вимкніть Defender",
-	"classicPhotoViewerSw": "Відновити Classic Photo Viewer"
+	"classicPhotoViewerSw": "Відновити Classic Photo Viewer",
+	"tabPage3": "Шрифти",
+	"fontSetTitle": "Установіть свій улюблений шрифт як стандартний шрифт Windows",
+	"label11": "Поточний шрифт:",
+	"btnSetGlobalFont": "Установіть за замовчуванням",
+	"lblFontsCount": "Доступні шрифти:",
+	"btnRestoreFont": "Відновити за замовчуванням",
+	"btnRefreshFonts": "Оновити"
 }

+ 6 - 3
Optimizer/SilentConfig.cs

@@ -109,8 +109,14 @@ namespace Optimizer
         [JsonProperty("Block", NullValueHandling = NullValueHandling.Ignore)]
         public string[] Block { get; set; }
 
+        [JsonProperty("Remove", NullValueHandling = NullValueHandling.Ignore)]
+        public string[] Remove { get; set; }
+
         [JsonProperty("Add", NullValueHandling = NullValueHandling.Ignore)]
         public AddHostsEntry[] Add { get; set; }
+
+        [JsonProperty("IncludeWwwCname", NullValueHandling = NullValueHandling.Ignore)]
+        public bool? IncludeWwwCname { get; set; }
     }
 
     [Serializable]
@@ -121,9 +127,6 @@ namespace Optimizer
 
         [JsonProperty("IPAddress", NullValueHandling = NullValueHandling.Ignore)]
         public string IpAddress { get; set; }
-
-        [JsonProperty("Comment", NullValueHandling = NullValueHandling.Ignore)]
-        public string Comment { get; set; }
     }
 
     [Serializable]

+ 40 - 29
Optimizer/SilentOps.cs

@@ -18,7 +18,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("SilentOps.GetSilentConfig", ex.Message, ex.StackTrace);
+                Logger.LogError("SilentOps.GetSilentConfig", ex.Message, ex.StackTrace);
                 CurrentSilentConfig = null;
             }
             return CurrentSilentConfig;
@@ -26,31 +26,31 @@ namespace Optimizer
 
         internal static void ProcessAllActions()
         {
-            ErrorLogger.InitSilentReport();
+            Logger.InitSilentReport();
 
             if (Utilities.CurrentWindowsVersion == WindowsVersion.Windows7)
             {
                 ProcessTweaksGeneral();
-                ErrorLogger.LogInfoSilent("Tweaks | Windows 7");
+                Logger.LogInfoSilent("Tweaks | Windows 7");
             }
             if (Utilities.CurrentWindowsVersion == WindowsVersion.Windows8)
             {
                 ProcessTweaksGeneral();
                 ProcessTweaksWindows8();
-                ErrorLogger.LogInfoSilent("Tweaks | Windows 8.1");
+                Logger.LogInfoSilent("Tweaks | Windows 8.1");
             }
             if (Utilities.CurrentWindowsVersion == WindowsVersion.Windows10)
             {
                 ProcessTweaksGeneral();
                 ProcessTweaksWindows10();
-                ErrorLogger.LogInfoSilent("Tweaks | Windows 10");
+                Logger.LogInfoSilent("Tweaks | Windows 10");
             }
             if (Utilities.CurrentWindowsVersion == WindowsVersion.Windows11)
             {
                 ProcessTweaksGeneral();
                 ProcessTweaksWindows10();
                 ProcessTweaksWindows11();
-                ErrorLogger.LogInfoSilent("Tweaks | Windows 11");
+                Logger.LogInfoSilent("Tweaks | Windows 11");
             }
 
             ProcessAdvancedTweaks();
@@ -60,7 +60,7 @@ namespace Optimizer
             ProcessIntegrator();
             ProcessRegistryFix();
             ProcessCleaner();
-            ErrorLogger.GenerateSilentReport();
+            Logger.GenerateSilentReport();
 
             ProcessPostAction();
         }
@@ -133,23 +133,34 @@ namespace Optimizer
 
             CleanHelper.Clean();
             if (CurrentSilentConfig.Cleaner.RecycleBin.HasValue && CurrentSilentConfig.Cleaner.RecycleBin.Value) CleanHelper.EmptyRecycleBin();
-            ErrorLogger.LogInfoSilent($"Cleaner | Options");
+            Logger.LogInfoSilent($"Cleaner | Options");
         }
 
         internal static void ProcessHosts()
         {
             var addList = CurrentSilentConfig.HostsEditor.Add.Where(x => !string.IsNullOrEmpty(x.Domain) && !string.IsNullOrEmpty(x.IpAddress));
             var blockList = CurrentSilentConfig.HostsEditor.Block.Where(x => !string.IsNullOrEmpty(x));
+            var removeList = CurrentSilentConfig.HostsEditor.Remove.Where(x => !string.IsNullOrEmpty(x));
+            var includeWwwCname = CurrentSilentConfig.HostsEditor.IncludeWwwCname.HasValue ? CurrentSilentConfig.HostsEditor.IncludeWwwCname.Value : false;
 
             foreach (AddHostsEntry x in addList)
             {
-                HostsHelper.AddEntry(HostsHelper.SanitizeEntry(x.IpAddress) + " " + HostsHelper.SanitizeEntry(x.Domain), x.Comment);
-                ErrorLogger.LogInfoSilent($"Hosts | Add entry: {x.IpAddress} {x.Domain}");
+                HostsHelper.AddEntry(HostsHelper.SanitizeEntry(x.IpAddress) + " " + HostsHelper.SanitizeEntry(x.Domain));
+                if (includeWwwCname)
+                {
+                    HostsHelper.AddEntry(HostsHelper.SanitizeEntry(x.IpAddress) + " www." + HostsHelper.SanitizeEntry(x.Domain));
+                }
+                Logger.LogInfoSilent($"Hosts | Add entry: {x.IpAddress} {x.Domain}");
             }
             foreach (string x in blockList)
             {
                 HostsHelper.AddEntry("0.0.0.0 " + HostsHelper.SanitizeEntry(x));
-                ErrorLogger.LogInfoSilent($"Hosts | Block entry: {x}");
+                Logger.LogInfoSilent($"Hosts | Block entry: {x}");
+            }
+            foreach (string x in removeList)
+            {
+                HostsHelper.RemoveEntryFromTemplate(x);
+                Logger.LogInfoSilent($"Hosts | Remove entry: {x}");
             }
         }
 
@@ -194,13 +205,13 @@ namespace Optimizer
                 {
                     PingerHelper.SetDNSForAllNICs(PingerHelper.CleanBrowsingAdultDNSv4, PingerHelper.CleanBrowsingAdultDNSv6);
                 }
-                ErrorLogger.LogInfoSilent($"Pinger | Set DNS to: {dns}");
+                Logger.LogInfoSilent($"Pinger | Set DNS to: {dns}");
             }
             if (CurrentSilentConfig.Pinger.FlushDnsCache.HasValue &&
                 CurrentSilentConfig.Pinger.FlushDnsCache.Value == true)
             {
                 PingerHelper.FlushDNSCache();
-                ErrorLogger.LogInfoSilent($"Pinger | Flush DNS cache");
+                Logger.LogInfoSilent($"Pinger | Flush DNS cache");
             }
         }
 
@@ -212,12 +223,12 @@ namespace Optimizer
             foreach (string x in allowList)
             {
                 Utilities.AllowProcessToRun(x);
-                ErrorLogger.LogInfoSilent($"ProcessControl | Allow process: {x}");
+                Logger.LogInfoSilent($"ProcessControl | Allow process: {x}");
             }
             foreach (string x in blockList)
             {
                 Utilities.PreventProcessFromRunning(x);
-                ErrorLogger.LogInfoSilent($"ProcessControl | Prevent process: {x}");
+                Logger.LogInfoSilent($"ProcessControl | Prevent process: {x}");
             }
         }
 
@@ -227,49 +238,49 @@ namespace Optimizer
                 CurrentSilentConfig.RegistryFix.TaskManager.Value == true)
             {
                 Utilities.EnableTaskManager();
-                ErrorLogger.LogInfoSilent($"RegistryFix | EnableTaskManager");
+                Logger.LogInfoSilent($"RegistryFix | EnableTaskManager");
             }
             if (CurrentSilentConfig.RegistryFix.CommandPrompt.HasValue &&
                 CurrentSilentConfig.RegistryFix.CommandPrompt.Value == true)
             {
                 Utilities.EnableCommandPrompt();
-                ErrorLogger.LogInfoSilent($"RegistryFix | EnableCommandPrompt");
+                Logger.LogInfoSilent($"RegistryFix | EnableCommandPrompt");
             }
             if (CurrentSilentConfig.RegistryFix.ControlPanel.HasValue &&
                 CurrentSilentConfig.RegistryFix.ControlPanel.Value == true)
             {
                 Utilities.EnableControlPanel();
-                ErrorLogger.LogInfoSilent($"RegistryFix | EnableControlPanel");
+                Logger.LogInfoSilent($"RegistryFix | EnableControlPanel");
             }
             if (CurrentSilentConfig.RegistryFix.FolderOptions.HasValue &&
                 CurrentSilentConfig.RegistryFix.FolderOptions.Value == true)
             {
                 Utilities.EnableFolderOptions();
-                ErrorLogger.LogInfoSilent($"RegistryFix | EnableFolderOptions");
+                Logger.LogInfoSilent($"RegistryFix | EnableFolderOptions");
             }
             if (CurrentSilentConfig.RegistryFix.RunDialog.HasValue &&
                 CurrentSilentConfig.RegistryFix.RunDialog.Value == true)
             {
                 Utilities.EnableRunDialog();
-                ErrorLogger.LogInfoSilent($"RegistryFix | EnableRunDialog");
+                Logger.LogInfoSilent($"RegistryFix | EnableRunDialog");
             }
             if (CurrentSilentConfig.RegistryFix.RightClickMenu.HasValue &&
                 CurrentSilentConfig.RegistryFix.RightClickMenu.Value == true)
             {
                 Utilities.EnableContextMenu();
-                ErrorLogger.LogInfoSilent($"RegistryFix | EnableContextMenu");
+                Logger.LogInfoSilent($"RegistryFix | EnableContextMenu");
             }
             if (CurrentSilentConfig.RegistryFix.WindowsFirewall.HasValue &&
                 CurrentSilentConfig.RegistryFix.WindowsFirewall.Value == true)
             {
                 Utilities.EnableFirewall();
-                ErrorLogger.LogInfoSilent($"RegistryFix | EnableFirewall");
+                Logger.LogInfoSilent($"RegistryFix | EnableFirewall");
             }
             if (CurrentSilentConfig.RegistryFix.RegistryEditor.HasValue &&
                 CurrentSilentConfig.RegistryFix.RegistryEditor.Value == true)
             {
                 Utilities.EnableRegistryEditor();
-                ErrorLogger.LogInfoSilent($"RegistryFix | EnableRegistryEditor");
+                Logger.LogInfoSilent($"RegistryFix | EnableRegistryEditor");
             }
         }
 
@@ -280,18 +291,18 @@ namespace Optimizer
                 if (CurrentSilentConfig.Integrator.OpenWithCmd.Value)
                 {
                     IntegratorHelper.InstallOpenWithCMD();
-                    ErrorLogger.LogInfoSilent($"Integrator | InstallOpenWithCMD");
+                    Logger.LogInfoSilent($"Integrator | InstallOpenWithCMD");
                 }
                 else
                 {
                     IntegratorHelper.DeleteOpenWithCMD();
-                    ErrorLogger.LogInfoSilent($"Integrator | DeleteOpenWithCMD");
+                    Logger.LogInfoSilent($"Integrator | DeleteOpenWithCMD");
                 }
             }
             if (CurrentSilentConfig.Integrator.TakeOwnership.HasValue)
             {
                 IntegratorHelper.InstallTakeOwnership(!CurrentSilentConfig.Integrator.TakeOwnership.Value);
-                ErrorLogger.LogInfoSilent($"Integrator | TakeOwnership to {CurrentSilentConfig.Integrator.TakeOwnership.Value}");
+                Logger.LogInfoSilent($"Integrator | TakeOwnership to {CurrentSilentConfig.Integrator.TakeOwnership.Value}");
             }
         }
 
@@ -301,7 +312,7 @@ namespace Optimizer
                 CurrentSilentConfig.AdvancedTweaks.UnlockAllCores.Value == true)
             {
                 Utilities.UnlockAllCores();
-                ErrorLogger.LogInfoSilent("AdvancedTweaks | UnlockAllCores");
+                Logger.LogInfoSilent("AdvancedTweaks | UnlockAllCores");
             }
 
             if (CurrentSilentConfig.AdvancedTweaks.SvchostProcessSplitting.Disable.HasValue)
@@ -311,12 +322,12 @@ namespace Optimizer
                     CurrentSilentConfig.AdvancedTweaks.SvchostProcessSplitting.Ram > 0)
                 {
                     Utilities.DisableSvcHostProcessSplitting(CurrentSilentConfig.AdvancedTweaks.SvchostProcessSplitting.Ram.Value);
-                    ErrorLogger.LogInfoSilent($"AdvancedTweaks | DisableSvcHostProcessSplitting | RAM capacity: {CurrentSilentConfig.AdvancedTweaks.SvchostProcessSplitting.Ram.Value} GB");
+                    Logger.LogInfoSilent($"AdvancedTweaks | DisableSvcHostProcessSplitting | RAM capacity: {CurrentSilentConfig.AdvancedTweaks.SvchostProcessSplitting.Ram.Value} GB");
                 }
                 else
                 {
                     Utilities.EnableSvcHostProcessSplitting();
-                    ErrorLogger.LogInfoSilent("AdvancedTweaks | EnableSvcHostProcessSplitting");
+                    Logger.LogInfoSilent("AdvancedTweaks | EnableSvcHostProcessSplitting");
                 }
             }
 

+ 4 - 4
Optimizer/StartupHelper.cs

@@ -88,14 +88,14 @@ namespace Optimizer
                             }
                             catch (Exception ex)
                             {
-                                ErrorLogger.LogError("Utilities.GetRegistryStartupItemsHelper", ex.Message, ex.StackTrace);
+                                Logger.LogError("Utilities.GetRegistryStartupItemsHelper", ex.Message, ex.StackTrace);
                             }
                         }
                     }
                 }
                 catch (Exception ex)
                 {
-                    ErrorLogger.LogError("Utilities.GetRegistryStartupItemsHelper", ex.Message, ex.StackTrace);
+                    Logger.LogError("Utilities.GetRegistryStartupItemsHelper", ex.Message, ex.StackTrace);
                 }
             }
         }
@@ -116,7 +116,7 @@ namespace Optimizer
                 }
                 catch (Exception ex)
                 {
-                    ErrorLogger.LogError("Utilities.GetFolderStartupItemsHelper", ex.Message, ex.StackTrace);
+                    Logger.LogError("Utilities.GetFolderStartupItemsHelper", ex.Message, ex.StackTrace);
                 }
             }
 
@@ -134,7 +134,7 @@ namespace Optimizer
                 }
                 catch (Exception ex)
                 {
-                    ErrorLogger.LogError("Utilities.GetFolderStartupItemsHelper", ex.Message, ex.StackTrace);
+                    Logger.LogError("Utilities.GetFolderStartupItemsHelper", ex.Message, ex.StackTrace);
                 }
             }
         }

+ 5 - 5
Optimizer/StartupItem.cs

@@ -37,7 +37,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("FolderStartupItem.Remove", ex.Message, ex.StackTrace);
+                Logger.LogError("FolderStartupItem.Remove", ex.Message, ex.StackTrace);
             }
         }
 
@@ -49,7 +49,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("FolderStartupItem.LocateFile", ex.Message, ex.StackTrace);
+                Logger.LogError("FolderStartupItem.LocateFile", ex.Message, ex.StackTrace);
             }
         }
     }
@@ -66,7 +66,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("RegistryStartupItem.LocateKey", ex.Message, ex.StackTrace);
+                Logger.LogError("RegistryStartupItem.LocateKey", ex.Message, ex.StackTrace);
             }
         }
 
@@ -78,7 +78,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("RegistryStartupItem.Remove", ex.Message, ex.StackTrace);
+                Logger.LogError("RegistryStartupItem.Remove", ex.Message, ex.StackTrace);
             }
         }
 
@@ -90,7 +90,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("RegistryStartupItem.LocateFile", ex.Message, ex.StackTrace);
+                Logger.LogError("RegistryStartupItem.LocateFile", ex.Message, ex.StackTrace);
             }
         }
 

+ 5 - 1
Optimizer/UWPHelper.cs

@@ -1,5 +1,6 @@
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
+using System.Linq;
 using System.Management.Automation;
 
 namespace Optimizer
@@ -41,7 +42,10 @@ namespace Optimizer
                 foreach (PSObject x in psResult)
                 {
                     tmp = x.ToString().Replace("@", string.Empty).Replace("{", string.Empty).Replace("}", string.Empty).Replace("Name=", string.Empty).Replace("InstallLocation=", string.Empty).Trim().Split(';');
-                    modernApps.Add(new KeyValuePair<string, string>(tmp[0], tmp[1]));
+                    if (!modernApps.Any(i => i.Key == tmp[0]))
+                    {
+                        modernApps.Add(new KeyValuePair<string, string>(tmp[0], tmp[1]));
+                    }
                 }
             }
 

+ 16 - 16
Optimizer/Utilities.cs

@@ -205,7 +205,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Utilities.RunBatchFile", ex.Message, ex.StackTrace);
+                Logger.LogError("Utilities.RunBatchFile", ex.Message, ex.StackTrace);
             }
         }
 
@@ -226,7 +226,7 @@ namespace Optimizer
             catch (Exception ex)
             {
                 p.Dispose();
-                ErrorLogger.LogError("Utilities.ImportRegistryScript", ex.Message, ex.StackTrace);
+                Logger.LogError("Utilities.ImportRegistryScript", ex.Message, ex.StackTrace);
             }
             finally
             {
@@ -286,7 +286,7 @@ namespace Optimizer
                 }
                 catch (Exception ex)
                 {
-                    ErrorLogger.LogError("Utilities.StartService", ex.Message, ex.StackTrace);
+                    Logger.LogError("Utilities.StartService", ex.Message, ex.StackTrace);
                 }
             }
         }
@@ -369,7 +369,7 @@ namespace Optimizer
                 }
                 catch (Exception ex)
                 {
-                    ErrorLogger.LogError("Utilities.RunCommand", ex.Message, ex.StackTrace);
+                    Logger.LogError("Utilities.RunCommand", ex.Message, ex.StackTrace);
                 }
             }
         }
@@ -418,7 +418,7 @@ namespace Optimizer
                 }
                 catch (Exception ex)
                 {
-                    ErrorLogger.LogError("Utilities.RestartExplorer", ex.Message, ex.StackTrace);
+                    Logger.LogError("Utilities.RestartExplorer", ex.Message, ex.StackTrace);
                 }
             }
 
@@ -435,7 +435,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Utilities.FindKeyInRegistry", ex.Message, ex.StackTrace);
+                Logger.LogError("Utilities.FindKeyInRegistry", ex.Message, ex.StackTrace);
             }
         }
 
@@ -447,7 +447,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Utilities.ResetConfiguration", ex.Message, ex.StackTrace);
+                Logger.LogError("Utilities.ResetConfiguration", ex.Message, ex.StackTrace);
             }
             finally
             {
@@ -587,7 +587,7 @@ namespace Optimizer
 
             if (subKey == null)
             {
-                ErrorLogger.LogError("Utilities.OpenSubKeyWritable", $"Subkey {subkeyName} not found.", "-");
+                Logger.LogError("Utilities.OpenSubKeyWritable", $"Subkey {subkeyName} not found.", "-");
             }
 
             return subKey;
@@ -687,7 +687,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Utilities.EnableLoginVerbose", ex.Message, ex.StackTrace);
+                Logger.LogError("Utilities.EnableLoginVerbose", ex.Message, ex.StackTrace);
             }
         }
 
@@ -706,7 +706,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Utilities.UnlockAllCores", ex.Message, ex.StackTrace);
+                Logger.LogError("Utilities.UnlockAllCores", ex.Message, ex.StackTrace);
             }
         }
 
@@ -720,7 +720,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Utilities.DisableSvcHostProcessSplitting", ex.Message, ex.StackTrace);
+                Logger.LogError("Utilities.DisableSvcHostProcessSplitting", ex.Message, ex.StackTrace);
             }
         }
 
@@ -733,7 +733,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Utilities.EnableSvcHostProcessSplitting", ex.Message, ex.StackTrace);
+                Logger.LogError("Utilities.EnableSvcHostProcessSplitting", ex.Message, ex.StackTrace);
             }
         }
 
@@ -762,7 +762,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Utilities.AddToStartup", ex.Message, ex.StackTrace);
+                Logger.LogError("Utilities.AddToStartup", ex.Message, ex.StackTrace);
             }
         }
 
@@ -777,7 +777,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Utilities.DeleteFromStartup", ex.Message, ex.StackTrace);
+                Logger.LogError("Utilities.DeleteFromStartup", ex.Message, ex.StackTrace);
             }
         }
 
@@ -802,7 +802,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Utilities.AllowProcessToRun", ex.Message, ex.StackTrace);
+                Logger.LogError("Utilities.AllowProcessToRun", ex.Message, ex.StackTrace);
             }
         }
 
@@ -834,7 +834,7 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                ErrorLogger.LogError("Utilities.PreventProcessFromRunning", ex.Message, ex.StackTrace);
+                Logger.LogError("Utilities.PreventProcessFromRunning", ex.Message, ex.StackTrace);
             }
         }
 

+ 6 - 6
README.md

@@ -3,7 +3,7 @@
 </p>
 
 <p align="center">
-	<a href="https://github.com/hellzerg/optimizer/releases/download/15.6/Optimizer-15.6.exe" target="_blank">
+	<a href="https://github.com/hellzerg/optimizer/releases/download/15.7/Optimizer-15.7.exe" target="_blank">
 		<img src="https://raw.githubusercontent.com/hellzerg/optimizer/master/download-button.png">
 		<br>
 		<img src="https://raw.githubusercontent.com/hellzerg/optimizer/master/flags.png">
@@ -20,7 +20,7 @@ Welcome to Optimizer, an advanced configuration utility designed to enhance your
 - Enhance system and network performance
 - Disable unnecessary Windows services
 - Turn off Windows telemetry, Cortana, and more
-- Disable Office telemetry (works with Office 2016)
+- Disable Office telemetry (works with Office 2016 or newer)
 - Stop automatic Windows 10 updates
 - Download multiple useful apps quickly
 - Uninstall UWP apps
@@ -36,7 +36,7 @@ Welcome to Optimizer, an advanced configuration utility designed to enhance your
 - Hardware inspection tool
 - Add items to the desktop right-click menu
 - Define custom commands for the run dialog
-- Support silent runs using a configuration file
+- Support silent runs using a template file
 
 ## ⬇️ Downloads
 
@@ -80,10 +80,10 @@ Learn about our security measures in the [Security Policy](https://github.com/he
 
 ## 📊 Details
 
-- Latest version: 15.6 (Released: July 22, 2023)
-- SHA256: 147FF45704BF458F93E2132AC0EE648AA89DFE44FCDC73C6C880153A948E360A
+- Latest version: 15.7 (Released: August 19, 2023)
+- SHA256: C02ECD80CDCAB51654DF2D56E412252BF9509037301426F5E862602554747CED
 
-## ☕ Support the Developer
+## ☕ Buy me a delicious espresso
 
 If you find this tool useful, consider showing your support by [donating through PayPal](https://www.paypal.com/paypalme/supportoptimizer).
 

+ 127 - 0
templates/template-windows10.json

@@ -0,0 +1,127 @@
+{
+    "WindowsVersion": 10,
+    "PostAction": {
+        "Restart": null,
+        "RestartType": "Normal"
+    },
+    "Cleaner": {
+        "TempFiles": null,
+        "BsodDumps": null,
+        "ErrorReports": null,
+        "RecycleBin": null,
+        "InternetExplorer": null,
+        "GoogleChrome": {
+            "Cache": null,
+            "Cookies": null,
+            "History": null,
+            "Session": null,
+            "Passwords": null
+        },
+        "MozillaFirefox": {
+            "Cache": null,
+            "Cookies": null,
+            "History": null
+        },
+        "MicrosoftEdge": {
+            "Cache": null,
+            "Cookies": null,
+            "History": null,
+            "Session": null
+        },
+        "BraveBrowser": {
+            "Cache": null,
+            "Cookies": null,
+            "History": null,
+            "Session": null,
+            "Passwords": null
+        }
+    },
+    "Pinger": {
+        "SetDNS": "",
+        "FlushDNSCache": null
+    },
+    "ProcessControl": {
+        "Prevent": [],
+        "Allow": []
+    },
+    "HostsEditor": {
+        "Block": [],
+        "Add": [],
+        "Remove": [],
+        "IncludeWwwCname": null
+    },
+    "RegistryFix": {
+        "TaskManager": null,
+        "CommandPrompt": null,
+        "ControlPanel": null,
+        "FolderOptions": null,
+        "RunDialog": null,
+        "RightClickMenu": null,
+        "WindowsFirewall": null,
+        "RegistryEditor": null
+    },
+    "Integrator": {
+        "TakeOwnership": null,
+        "OpenWithCMD": null
+    },
+    "AdvancedTweaks": {
+        "UnlockAllCores": null,
+        "DisableHPET": null,
+        "EnableLoginVerbose": null,
+        "SvchostProcessSplitting": {
+            "Disable": null,
+            "RAM": null
+        }
+    },
+    "Tweaks": {
+        "EnablePerformanceTweaks": null,
+        "DisableNetworkThrottling": null,
+        "DisableSystemRestore": null,
+        "DisablePrintService": null,
+        "DisableMediaPlayerSharing": null,
+        "DisableErrorReporting": null,
+        "DisableHomeGroup": null,
+        "DisableSuperfetch": null,
+        "DisableTelemetryTasks": null,
+        "DisableOffice2016Telemetry": null,
+        "DisableCompatibilityAssistant": null,
+        "DisableHibernation": null,
+        "DisableSMB1": null,
+        "DisableSMB2": null,
+        "DisableNTFSTimeStamp": null,
+        "DisableFaxService": null,
+        "DisableSmartScreen": null,
+        "DisableStickyKeys": null,
+        "DisableCloudClipboard": null,
+        "EnableLegacyVolumeSlider": null,
+        "DisableQuickAccessHistory": null,
+        "DisableStartMenuAds": null,
+        "UninstallOneDrive": null,
+        "DisableMyPeople": null,
+        "DisableAutomaticUpdates": null,
+        "ExcludeDrivers": null,
+        "DisableTelemetryServices": null,
+        "DisablePrivacyOptions": null,
+        "DisableCortana": null,
+        "DisableSensorServices": null,
+        "DisableWindowsInk": null,
+        "DisableSpellingTyping": null,
+        "DisableXboxLive": null,
+        "DisableGameBar": null,
+        "DisableInsiderService": null,
+        "DisableStoreUpdates": null,
+        "EnableLongPaths": null,
+        "RemoveCastToDevice": null,
+        "EnableGamingMode": null,
+        "DisableTPMCheck": null,
+        "DisableVirtualizationBasedTechnology": null,
+        "DisableVisualStudioTelemetry": null,
+        "DisableFirefoxTemeletry": null,
+        "DisableChromeTelemetry": null,
+        "DisableNVIDIATelemetry": null,
+        "DisableSearch": null,
+        "DisableEdgeDiscoverBar": null,
+        "DisableEdgeTelemetry": null,
+        "RestoreClassicPhotoViewer": null
+    }
+}

+ 4 - 2
templates/optimizer-template.json → templates/template-windows11.json

@@ -1,5 +1,5 @@
 {
-    "WindowsVersion": 10,
+    "WindowsVersion": 11,
     "PostAction": {
         "Restart": null,
         "RestartType": "Normal"
@@ -46,7 +46,9 @@
     },
     "HostsEditor": {
         "Block": [],
-        "Add": []
+        "Add": [],
+        "Remove": [],
+        "IncludeWwwCname": null
     },
     "RegistryFix": {
         "TaskManager": null,

+ 98 - 0
templates/template-windows7.json

@@ -0,0 +1,98 @@
+{
+    "WindowsVersion": 7,
+    "PostAction": {
+        "Restart": null,
+        "RestartType": "Normal"
+    },
+    "Cleaner": {
+        "TempFiles": null,
+        "BsodDumps": null,
+        "ErrorReports": null,
+        "RecycleBin": null,
+        "InternetExplorer": null,
+        "GoogleChrome": {
+            "Cache": null,
+            "Cookies": null,
+            "History": null,
+            "Session": null,
+            "Passwords": null
+        },
+        "MozillaFirefox": {
+            "Cache": null,
+            "Cookies": null,
+            "History": null
+        },
+        "MicrosoftEdge": {
+            "Cache": null,
+            "Cookies": null,
+            "History": null,
+            "Session": null
+        },
+        "BraveBrowser": {
+            "Cache": null,
+            "Cookies": null,
+            "History": null,
+            "Session": null,
+            "Passwords": null
+        }
+    },
+    "Pinger": {
+        "SetDNS": "",
+        "FlushDNSCache": null
+    },
+    "ProcessControl": {
+        "Prevent": [],
+        "Allow": []
+    },
+    "HostsEditor": {
+        "Block": [],
+        "Add": [],
+        "Remove": [],
+        "IncludeWwwCname": null
+    },
+    "RegistryFix": {
+        "TaskManager": null,
+        "CommandPrompt": null,
+        "ControlPanel": null,
+        "FolderOptions": null,
+        "RunDialog": null,
+        "RightClickMenu": null,
+        "WindowsFirewall": null,
+        "RegistryEditor": null
+    },
+    "Integrator": {
+        "TakeOwnership": null,
+        "OpenWithCMD": null
+    },
+    "AdvancedTweaks": {
+        "UnlockAllCores": null,
+        "DisableHPET": null,
+        "EnableLoginVerbose": null
+    },
+    "Tweaks": {
+        "EnablePerformanceTweaks": null,
+        "DisableNetworkThrottling": null,
+        "DisableWindowsDefender": null,
+        "DisableSystemRestore": null,
+        "DisablePrintService": null,
+        "DisableMediaPlayerSharing": null,
+        "DisableErrorReporting": null,
+        "DisableHomeGroup": null,
+        "DisableSuperfetch": null,
+        "DisableTelemetryTasks": null,
+        "DisableOffice2016Telemetry": null,
+        "DisableCompatibilityAssistant": null,
+        "DisableHibernation": null,
+        "DisableSMB1": null,
+        "DisableSMB2": null,
+        "DisableNTFSTimeStamp": null,
+        "DisableFaxService": null,
+        "DisableSmartScreen": null,
+        "DisableStickyKeys": null,
+        "DisableVisualStudioTelemetry": null,
+        "DisableFirefoxTemeletry": null,
+        "DisableChromeTelemetry": null,
+        "DisableNVIDIATelemetry": null,
+        "DisableSearch": null
+    }
+}

+ 99 - 0
templates/template-windows8.json

@@ -0,0 +1,99 @@
+{
+    "WindowsVersion": 8,
+    "PostAction": {
+        "Restart": null,
+        "RestartType": "Normal"
+    },
+    "Cleaner": {
+        "TempFiles": null,
+        "BsodDumps": null,
+        "ErrorReports": null,
+        "RecycleBin": null,
+        "InternetExplorer": null,
+        "GoogleChrome": {
+            "Cache": null,
+            "Cookies": null,
+            "History": null,
+            "Session": null,
+            "Passwords": null
+        },
+        "MozillaFirefox": {
+            "Cache": null,
+            "Cookies": null,
+            "History": null
+        },
+        "MicrosoftEdge": {
+            "Cache": null,
+            "Cookies": null,
+            "History": null,
+            "Session": null
+        },
+        "BraveBrowser": {
+            "Cache": null,
+            "Cookies": null,
+            "History": null,
+            "Session": null,
+            "Passwords": null
+        }
+    },
+    "Pinger": {
+        "SetDNS": "",
+        "FlushDNSCache": null
+    },
+    "ProcessControl": {
+        "Prevent": [],
+        "Allow": []
+    },
+    "HostsEditor": {
+        "Block": [],
+        "Add": [],
+        "Remove": [],
+        "IncludeWwwCname": null
+    },
+    "RegistryFix": {
+        "TaskManager": null,
+        "CommandPrompt": null,
+        "ControlPanel": null,
+        "FolderOptions": null,
+        "RunDialog": null,
+        "RightClickMenu": null,
+        "WindowsFirewall": null,
+        "RegistryEditor": null
+    },
+    "Integrator": {
+        "TakeOwnership": null,
+        "OpenWithCMD": null
+    },
+    "AdvancedTweaks": {
+        "UnlockAllCores": null,
+        "DisableHPET": null,
+        "EnableLoginVerbose": null
+    },
+    "Tweaks": {
+        "EnablePerformanceTweaks": null,
+        "DisableNetworkThrottling": null,
+        "DisableWindowsDefender": null,
+        "DisableSystemRestore": null,
+        "DisablePrintService": null,
+        "DisableMediaPlayerSharing": null,
+        "DisableErrorReporting": null,
+        "DisableHomeGroup": null,
+        "DisableSuperfetch": null,
+        "DisableTelemetryTasks": null,
+        "DisableOffice2016Telemetry": null,
+        "DisableCompatibilityAssistant": null,
+        "DisableHibernation": null,
+        "DisableSMB1": null,
+        "DisableSMB2": null,
+        "DisableNTFSTimeStamp": null,
+        "DisableFaxService": null,
+        "DisableSmartScreen": null,
+        "DisableStickyKeys": null,
+        "DisableVisualStudioTelemetry": null,
+        "DisableFirefoxTemeletry": null,
+        "DisableChromeTelemetry": null,
+        "DisableNVIDIATelemetry": null,
+        "DisableSearch": null,
+        "DisableOneDrive": null
+    }
+}

+ 1 - 1
version.txt

@@ -1 +1 @@
-15.6
+15.7

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels