Переглянути джерело

More improvements with v9.4

deadmoon 3 роки тому
батько
коміт
5ad67d1f24

+ 7 - 0
CHANGELOG.md

@@ -2,6 +2,13 @@
 
 
 All notable changes to this project will be documented in this file.
 All notable changes to this project will be documented in this file.
 
 
+## [9.4] - 2021-07-14
+- New: App now opens slightly faster
+- New: Enhance Privacy now attempts to enable Group Policy Editor (gpedit.msc)
+- Improved: Flush DNS cache
+- Improved: Privacy tweaks (Disable Cloud Search, Find my Device, Timeline)
+- Improved: Defender & Xbox tweaks
+
 ## [9.3] - 2021-06-29
 ## [9.3] - 2021-06-29
 - New: Fully translated into German (thanks to https://github.com/theflamehd - theflamehd)
 - New: Fully translated into German (thanks to https://github.com/theflamehd - theflamehd)
 
 

Різницю між файлами не показано, бо вона завелика
+ 3566 - 3393
Optimizer/MainForm.Designer.cs


+ 60 - 55
Optimizer/MainForm.cs

@@ -6,6 +6,7 @@ using System.Diagnostics;
 using System.Drawing;
 using System.Drawing;
 using System.Globalization;
 using System.Globalization;
 using System.IO;
 using System.IO;
+using System.IO.Compression;
 using System.Linq;
 using System.Linq;
 using System.Net;
 using System.Net;
 using System.Net.NetworkInformation;
 using System.Net.NetworkInformation;
@@ -631,71 +632,75 @@ namespace Optimizer
 
 
             client.Headers.Add("Cache-Control", "no-cache");
             client.Headers.Add("Cache-Control", "no-cache");
 
 
-            Directory.CreateDirectory(@"%AppData%\Optimizer");
-            client.DownloadFile(_feedImages, @"%appdata%\Optimizer\feed-images.zip");
+            string tmpImageFileName = string.Empty;
+            string tmpDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Optimizer-tmp");
+            
+            Directory.CreateDirectory(tmpDir);
+            client.DownloadFile(_feedImages, Path.Combine(tmpDir, "feed-images.raw"));
 
 
-            //ZipArchiveEntry
-
-            try
+            using (FileStream fs = new FileStream(Path.Combine(tmpDir, "feed-images.raw"), FileMode.Open))
+            using (ZipArchive zip = new ZipArchive(fs))
             {
             {
-                string feed = client.DownloadString(_feedLink);
-                AppsFromFeed = JsonConvert.DeserializeObject<List<FeedApp>>(feed);
+                var zipEntries = zip.Entries;
 
 
-                AppCard appCard;
-                groupSystemTools.Controls.Clear();
-                groupInternet.Controls.Clear();
-                groupCoding.Controls.Clear();
-                groupSoundVideo.Controls.Clear();
-
-                foreach (FeedApp x in AppsFromFeed)
+                try
                 {
                 {
-                    appCard = new AppCard();
-                    appCard.AutoSize = true;
-                    appCard.Anchor = AnchorStyles.None;
-                    appCard.Anchor = AnchorStyles.Top | AnchorStyles.Left;
-                    appCard.appTitle.Text = x.Title;
-                    appCard.appTitle.Name = x.Tag;
-                    appCard.appImage.SizeMode = PictureBoxSizeMode.Zoom;
+                    string feed = client.DownloadString(_feedLink);
+                    AppsFromFeed = JsonConvert.DeserializeObject<List<FeedApp>>(feed);
 
 
+                    AppCard appCard;
+                    groupSystemTools.Controls.Clear();
+                    groupInternet.Controls.Clear();
+                    groupCoding.Controls.Clear();
+                    groupSoundVideo.Controls.Clear();
 
 
-                    //string s = x.Image.Substring(x.Image.LastIndexOf("/")+1, x.Image.Length - (x.Image.LastIndexOf("/") + 1));
-                    
-                    
-                    //appCard.appImage.LoadAsync(x.Image);
-
-                    switch (x.Group)
+                    foreach (FeedApp x in AppsFromFeed)
                     {
                     {
-                        case "SystemTools":
-                            appCard.Location = new Point(0, groupSystemTools.Controls.Count * 30);
-                            groupSystemTools.Controls.Add(appCard);
-                            break;
-                        case "Internet":
-                            appCard.Location = new Point(0, groupInternet.Controls.Count * 30);
-                            groupInternet.Controls.Add(appCard);
-                            break;
-                        case "Coding":
-                            appCard.Location = new Point(0, groupCoding.Controls.Count * 30);
-                            groupCoding.Controls.Add(appCard);
-                            break;
-                        case "GraphicsSound":
-                            appCard.Location = new Point(0, groupSoundVideo.Controls.Count * 30);
-                            groupSoundVideo.Controls.Add(appCard);
-                            break;
-                        default:
-                            break;
+                        appCard = new AppCard();
+                        appCard.AutoSize = true;
+                        appCard.Anchor = AnchorStyles.None;
+                        appCard.Anchor = AnchorStyles.Top | AnchorStyles.Left;
+                        appCard.appTitle.Text = x.Title;
+                        appCard.appTitle.Name = x.Tag;
+                        appCard.appImage.SizeMode = PictureBoxSizeMode.Zoom;
+
+                        tmpImageFileName = x.Image.Substring(x.Image.LastIndexOf("/")+1, x.Image.Length - (x.Image.LastIndexOf("/") + 1));
+                        appCard.appImage.Image = Image.FromStream(zipEntries.First(ifn => ifn.Name == tmpImageFileName).Open());
+
+                        switch (x.Group)
+                        {
+                            case "SystemTools":
+                                appCard.Location = new Point(0, groupSystemTools.Controls.Count * 30);
+                                groupSystemTools.Controls.Add(appCard);
+                                break;
+                            case "Internet":
+                                appCard.Location = new Point(0, groupInternet.Controls.Count * 30);
+                                groupInternet.Controls.Add(appCard);
+                                break;
+                            case "Coding":
+                                appCard.Location = new Point(0, groupCoding.Controls.Count * 30);
+                                groupCoding.Controls.Add(appCard);
+                                break;
+                            case "GraphicsSound":
+                                appCard.Location = new Point(0, groupSoundVideo.Controls.Count * 30);
+                                groupSoundVideo.Controls.Add(appCard);
+                                break;
+                            default:
+                                break;
+                        }
                     }
                     }
-                }
 
 
-                // UI handling
-                btnDownloadApps.Enabled = true;
-                txtFeedError.Visible = false;
-            }
-            catch (Exception ex)
-            {
-                btnDownloadApps.Enabled = false;
-                txtFeedError.Visible = true;
+                    // UI handling
+                    btnDownloadApps.Enabled = true;
+                    txtFeedError.Visible = false;
+                }
+                catch (Exception ex)
+                {
+                    btnDownloadApps.Enabled = false;
+                    txtFeedError.Visible = true;
 
 
-                ErrorLogger.LogError("MainForm.GetFeed", ex.Message, ex.StackTrace);
+                    ErrorLogger.LogError("MainForm.GetFeed", ex.Message, ex.StackTrace);
+                }
             }
             }
         }
         }
 
 

+ 41 - 0
Optimizer/Optimize.cs

@@ -366,6 +366,9 @@ namespace Optimizer
 
 
         internal static void DisableDefender()
         internal static void DisableDefender()
         {
         {
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\MpEngine", "MpEnablePus", "0", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender", "PUAProtection", "0", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Policy Manager", "DisableScanningNetworkFiles", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender", "DisableAntiSpyware", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender", "DisableAntiSpyware", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender", "DisableRealtimeMonitoring", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender", "DisableRealtimeMonitoring", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Spynet", "SpyNetReporting", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Spynet", "SpyNetReporting", "0", RegistryValueKind.DWord);
@@ -400,6 +403,9 @@ namespace Optimizer
 
 
         internal static void EnableDefender()
         internal static void EnableDefender()
         {
         {
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\MpEngine", "MpEnablePus", "1", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender", "PUAProtection", "1", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Policy Manager", "DisableScanningNetworkFiles", "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("DisableRealtimeMonitoring", false);
             Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Policies\Microsoft\Windows Defender", true).DeleteValue("DisableAntiSpyware", 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("SpyNetReporting", false);
@@ -603,6 +609,7 @@ namespace Optimizer
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search", "AllowSearchToUseLocation", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search", "AllowSearchToUseLocation", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search", "BingSearchEnabled", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search", "BingSearchEnabled", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search", "CortanaConsent", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search", "CortanaConsent", "0", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search", "AllowCloudSearch", "0", RegistryValueKind.DWord);
         }
         }
 
 
         internal static void EnableCortana()
         internal static void EnableCortana()
@@ -618,6 +625,7 @@ namespace Optimizer
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search", "AllowSearchToUseLocation", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search", "AllowSearchToUseLocation", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search", "BingSearchEnabled", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search", "BingSearchEnabled", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search", "CortanaConsent", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search", "CortanaConsent", "1", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search", "AllowCloudSearch", "1", RegistryValueKind.DWord);
         }
         }
 
 
         internal static void DisableXboxLive()
         internal static void DisableXboxLive()
@@ -679,6 +687,8 @@ namespace Optimizer
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "OemPreInstalledAppsEnabled", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "OemPreInstalledAppsEnabled", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore", "AutoDownload", "2", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore", "AutoDownload", "2", RegistryValueKind.DWord);
 
 
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance", "MaintenanceDisabled", "1", RegistryValueKind.DWord);
+
             Utilities.StopService("DoSvc");
             Utilities.StopService("DoSvc");
         }
         }
 
 
@@ -695,6 +705,8 @@ namespace Optimizer
             //Utilities.StartService("DoSvc");
             //Utilities.StartService("DoSvc");
 
 
             // enable silent app install
             // enable silent app install
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance", "MaintenanceDisabled", "0", RegistryValueKind.DWord);
+
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SilentInstalledAppsEnabled", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SilentInstalledAppsEnabled", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent", "DisableSoftLanding", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent", "DisableSoftLanding", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "PreInstalledAppsEnabled", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "PreInstalledAppsEnabled", "1", RegistryValueKind.DWord);
@@ -800,6 +812,13 @@ namespace Optimizer
 
 
         internal static void EnhancePrivacy()
         internal static void EnhancePrivacy()
         {
         {
+            // Find my device
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\FindMyDevice", "AllowFindMyDevice", "0", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Settings\FindMyDevice", "LocationSyncEnabled", "0", RegistryValueKind.DWord);
+
+            // Timeline
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System", "EnableActivityFeed", "0", RegistryValueKind.DWord);
+
             // Shared Experiences
             // Shared Experiences
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System", "EnableCdp", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System", "EnableCdp", "0", RegistryValueKind.DWord);
 
 
@@ -870,10 +889,30 @@ namespace Optimizer
 
 
             // Projecting to this PC
             // Projecting to this PC
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Connect", "AllowProjectionToPC", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Connect", "AllowProjectionToPC", "0", RegistryValueKind.DWord);
+
+            // attempt to enable Local Group Policy Editor on Windows 10 Home editions
+            if (Utilities.CurrentWindowsVersion == WindowsVersion.Windows10 && Utilities.GetOS().ToLowerInvariant().Contains("home"))
+            {
+                Utilities.EnableGPEDitor();
+            }
         }
         }
 
 
         internal static void CompromisePrivacy()
         internal static void CompromisePrivacy()
         {
         {
+            // Find my device
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\FindMyDevice", "AllowFindMyDevice", "1", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Settings\FindMyDevice", "LocationSyncEnabled", "1", RegistryValueKind.DWord);
+
+            // Timeline
+            try
+            {
+                Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Policies\Microsoft\Windows\System", true).DeleteValue("EnableActivityFeed", false);
+            }
+            catch (Exception ex)
+            {
+                ErrorLogger.LogError("Optimize.CompromisePrivacy", ex.Message, ex.StackTrace);
+            }
+
             // Shared Experiences
             // Shared Experiences
             try
             try
             {
             {
@@ -944,6 +983,7 @@ namespace Optimizer
 
 
         internal static void DisableGameBar()
         internal static void DisableGameBar()
         {
         {
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\GameBar", "AutoGameModeEnabled", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\GameDVR", "AppCaptureEnabled", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\GameDVR", "AppCaptureEnabled", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\GameDVR", "AudioCaptureEnabled", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\GameDVR", "AudioCaptureEnabled", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\GameDVR", "CursorCaptureEnabled", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\GameDVR", "CursorCaptureEnabled", "0", RegistryValueKind.DWord);
@@ -956,6 +996,7 @@ namespace Optimizer
 
 
         internal static void EnableGameBar()
         internal static void EnableGameBar()
         {
         {
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\GameBar", "AutoGameModeEnabled", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\GameDVR", "AppCaptureEnabled", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\GameDVR", "AppCaptureEnabled", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\GameDVR", "AudioCaptureEnabled", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\GameDVR", "AudioCaptureEnabled", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\GameDVR", "CursorCaptureEnabled", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\GameDVR", "CursorCaptureEnabled", "1", RegistryValueKind.DWord);

+ 3 - 0
Optimizer/Optimizer.csproj

@@ -66,6 +66,7 @@
     </Reference>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Core" />
+    <Reference Include="System.IO.Compression" />
     <Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
     <Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <SpecificVersion>False</SpecificVersion>
       <HintPath>C:\Windows\assembly\GAC_MSIL\System.Management.Automation\1.0.0.0__31bf3856ad364e35\System.Management.Automation.dll</HintPath>
       <HintPath>C:\Windows\assembly\GAC_MSIL\System.Management.Automation\1.0.0.0__31bf3856ad364e35\System.Management.Automation.dll</HintPath>
@@ -236,6 +237,8 @@
     <None Include="Resources\EnableTelemetryTasks.bat" />
     <None Include="Resources\EnableTelemetryTasks.bat" />
     <None Include="Resources\EnableXboxTasks.bat" />
     <None Include="Resources\EnableXboxTasks.bat" />
     <None Include="Resources\EL.json" />
     <None Include="Resources\EL.json" />
+    <None Include="Resources\FlushDNSCache.bat" />
+    <None Include="Resources\GPEditEnablerInHome.bat" />
     <None Include="Resources\hosts" />
     <None Include="Resources\hosts" />
     <None Include="Resources\InstallTakeOwnership.reg" />
     <None Include="Resources\InstallTakeOwnership.reg" />
     <None Include="Resources\PowerMenu.reg" />
     <None Include="Resources\PowerMenu.reg" />

+ 1 - 1
Optimizer/Program.cs

@@ -13,7 +13,7 @@ namespace Optimizer
         // Enter current version here
         // Enter current version here
 
 
         internal readonly static float Major = 9;
         internal readonly static float Major = 9;
-        internal readonly static float Minor = 3;
+        internal readonly static float Minor = 4;
 
 
         internal readonly static bool EXPERIMENTAL_BUILD = false;
         internal readonly static bool EXPERIMENTAL_BUILD = false;
 
 

+ 34 - 2
Optimizer/Properties/Resources.Designer.cs

@@ -70,10 +70,10 @@ namespace Optimizer.Properties {
         ///	&quot;txtVersion&quot;: &quot;Version: {VN}&quot;,
         ///	&quot;txtVersion&quot;: &quot;Version: {VN}&quot;,
         ///	&quot;txtBitness&quot;: &quot;Sie arbeiten mit {BITS}&quot;,
         ///	&quot;txtBitness&quot;: &quot;Sie arbeiten mit {BITS}&quot;,
         ///	&quot;linkUpdate&quot;: &quot;Update verfügbar&quot;,
         ///	&quot;linkUpdate&quot;: &quot;Update verfügbar&quot;,
-        ///	&quot;lblLab&quot;: &quot;Experimenteller Build (nach dem Testen löschen)&quot;,
+        ///	&quot;lblLab&quot;: &quot;Experimenteller Build\n(nach dem Testen löschen)&quot;,
         ///	&quot;performanceSw&quot;: &quot;Leistungsoptimierungen aktivieren&quot;,
         ///	&quot;performanceSw&quot;: &quot;Leistungsoptimierungen aktivieren&quot;,
         ///	&quot;networkSw&quot;: &quot;Netzwerkdrosselung deaktivieren&quot;,
         ///	&quot;networkSw&quot;: &quot;Netzwerkdrosselung deaktivieren&quot;,
-        ///	&quot;defend [rest of string was truncated]&quot;;.
+        ///	&quot;defen [rest of string was truncated]&quot;;.
         /// </summary>
         /// </summary>
         internal static string DE {
         internal static string DE {
             get {
             get {
@@ -273,6 +273,38 @@ namespace Optimizer.Properties {
             }
             }
         }
         }
         
         
+        /// <summary>
+        ///   Looks up a localized string similar to ipconfig /release
+        ///ipconfig /renew
+        ///arp -d *
+        ///nbtstat -R
+        ///nbtstat -RR
+        ///ipconfig /flushdns
+        ///ipconfig /registerdns.
+        /// </summary>
+        internal static string FlushDNSCache {
+            get {
+                return ResourceManager.GetString("FlushDNSCache", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to @echo off 
+        ///
+        ///pushd &quot;%~dp0&quot; 
+        ///
+        ///dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum &gt;List.txt 
+        ///dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum &gt;&gt;List.txt 
+        ///
+        ///for /f %%i in (&apos;findstr /i . List.txt 2^&gt;nul&apos;) do dism /online /norestart /add-package:&quot;%SystemRoot%\servicing\Packages\%%i&quot; 
+        ///.
+        /// </summary>
+        internal static string GPEditEnablerInHome {
+            get {
+                return ResourceManager.GetString("GPEditEnablerInHome", resourceCulture);
+            }
+        }
+        
         /// <summary>
         /// <summary>
         ///   Looks up a localized resource of type System.Byte[].
         ///   Looks up a localized resource of type System.Byte[].
         /// </summary>
         /// </summary>

+ 6 - 0
Optimizer/Properties/Resources.resx

@@ -184,4 +184,10 @@
   <data name="DE" type="System.Resources.ResXFileRef, System.Windows.Forms">
   <data name="DE" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\DE.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
     <value>..\Resources\DE.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
   </data>
   </data>
+  <data name="GPEditEnablerInHome" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\GPEditEnablerInHome.bat;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
+  </data>
+  <data name="FlushDNSCache" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\FlushDNSCache.bat;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
+  </data>
 </root>
 </root>

+ 6 - 2
Optimizer/Required.cs

@@ -44,7 +44,9 @@ namespace Optimizer
             ScriptsFolder + "EnableTelemetryTasks.bat",
             ScriptsFolder + "EnableTelemetryTasks.bat",
             ScriptsFolder + "DisableXboxTasks.bat",
             ScriptsFolder + "DisableXboxTasks.bat",
             ScriptsFolder + "EnableXboxTasks.bat",
             ScriptsFolder + "EnableXboxTasks.bat",
-            ScriptsFolder + "OneDrive_Uninstaller.cmd"
+            ScriptsFolder + "OneDrive_Uninstaller.cmd",
+            ScriptsFolder + "GPEditEnablerInHome.bat",
+            ScriptsFolder + "FlushDNSCache.bat"
         };
         };
 
 
         readonly static string[] scriptFiles =
         readonly static string[] scriptFiles =
@@ -57,7 +59,9 @@ namespace Optimizer
             Properties.Resources.EnableTelemetryTasks,
             Properties.Resources.EnableTelemetryTasks,
             Properties.Resources.DisableXboxTasks,
             Properties.Resources.DisableXboxTasks,
             Properties.Resources.EnableXboxTasks,
             Properties.Resources.EnableXboxTasks,
-            Encoding.UTF8.GetString(Properties.Resources.OneDrive_Uninstaller)
+            Encoding.UTF8.GetString(Properties.Resources.OneDrive_Uninstaller),
+            Properties.Resources.GPEditEnablerInHome,
+            Properties.Resources.FlushDNSCache
         };
         };
 
 
         internal static void Deploy()
         internal static void Deploy()

+ 7 - 0
Optimizer/Resources/FlushDNSCache.bat

@@ -0,0 +1,7 @@
+ipconfig /release
+ipconfig /renew
+arp -d *
+nbtstat -R
+nbtstat -RR
+ipconfig /flushdns
+ipconfig /registerdns

+ 5 - 0
Optimizer/Resources/GPEditEnablerInHome.bat

@@ -0,0 +1,5 @@
+@echo off 
+pushd "%~dp0" 
+dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt 
+dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>List.txt 
+for /f %%i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i" 

+ 8 - 1
Optimizer/Utilities.cs

@@ -670,7 +670,8 @@ namespace Optimizer
 
 
         internal static void FlushDNSCache()
         internal static void FlushDNSCache()
         {
         {
-            Utilities.RunCommand("ipconfig /release && ipconfig /flushdns && ipconfig /renew");
+            Utilities.RunBatchFile(Required.ScriptsFolder + "FlushDNSCache.bat");
+            //Utilities.RunCommand("ipconfig /release && ipconfig /renew && arp -d * && nbtstat -R && nbtstat -RR && ipconfig /flushdns && ipconfig /registerdns");
         }
         }
 
 
         internal static string SanitizeFileFolderName(string fileName)
         internal static string SanitizeFileFolderName(string fileName)
@@ -679,6 +680,12 @@ namespace Optimizer
             return string.Join("_", fileName.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd('.');
             return string.Join("_", fileName.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd('.');
         }
         }
 
 
+        // attempt to enable Local Group Policy Editor on Windows 10 Home editions
+        internal static void EnableGPEDitor()
+        {
+            Utilities.RunBatchFile(Required.ScriptsFolder + "GPEditEnablerInHome.bat");
+        }
+
         internal static string CheckNETFramework()
         internal static string CheckNETFramework()
         {
         {
             string subkey = @"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\";
             string subkey = @"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\";

+ 3 - 3
README.md

@@ -68,6 +68,6 @@ https://github.com/hellzerg/optimizer/blob/master/FEED.md
 
 
 ## Details: ##
 ## Details: ##
 
 
-* Latest version: 9.3
-* Released: June 29, 2021
-* SHA256: 8FA253B35B4733A440CCD58D631D0E8C4B40AD00D35E1CE74F66BD344C21F56D
+* Latest version: 9.4
+* Released: July 14, 2021
+* SHA256: FB3CD075F0C50C5A2111EB67948AD3548DA395304187609A661DE190B30E55F1

+ 1 - 1
version.txt

@@ -1 +1 @@
-9.3
+9.4

Деякі файли не було показано, через те що забагато файлів було змінено