Browse Source

Maintenance update (v13.7)

deadmoon 2 years ago
parent
commit
6c4e0abda9

+ 7 - 0
CHANGELOG.md

@@ -1,3 +1,10 @@
+## [13.7] - 2022-08-05
+- New: Disable/Enable HPET using ```/disablehpet``` & ```/enablehpet``` switches
+- New: Allow Optimizer to run on startup using ```/addstartup``` (#206)
+- Hotfix: Disable Telemetry Services no longer disables Diagnostics Policy service (DPS), which is responsible for network app usage (#212)
+- Hotfix: Proper DPI scaling for software list in Apps (#193)
+- Improved: Enhance Privacy now disables Phone Link
+
 ## [13.6] - 2022-06-12
 - New: Fully translated into Romanian (thanks to BeamingNG - https://github.com/BeamingNG)
 - New: DPI awareness support

+ 10 - 0
CONFS.md

@@ -55,6 +55,16 @@
 - ```optimizer.exe /disablehibernate```
 - ```optimizer.exe /enablehibernate```
 
+## How to add or delete Optimizer from Windows startup ##
+
+- ```optimizer.exe /addstartup```
+- ```optimizer.exe /deletestartup```
+
+## How to disable/enable HPET (High Precision Event Timer) in order to gain a boost when gaming [use at your own risk!] ##
+
+- ```optimizer.exe /disablehpet```
+- ```optimizer.exe /enablehpet```
+
 ## You can execute Optimizer silently, applying tweaks according to a configuration file. ##
 
 Download the configuration file based on your Windows version and edit it accordingly.

File diff suppressed because it is too large
+ 4283 - 4283
Optimizer/Forms/MainForm.Designer.cs


+ 9 - 4
Optimizer/Forms/MainForm.cs

@@ -98,6 +98,9 @@ namespace Optimizer
 
         UpdateForm _updateForm;
 
+        // TESTDPI
+        int DPI_PREFERENCE;
+
         private string NewDownloadLink(string latestVersion)
         {
             return string.Format("https://github.com/hellzerg/optimizer/releases/download/{0}/Optimizer-{0}.exe", latestVersion);
@@ -636,6 +639,8 @@ namespace Optimizer
 
             CheckForIllegalCrossThreadCalls = false;
 
+            DPI_PREFERENCE = Convert.ToInt32(Microsoft.Win32.Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ThemeManager", "LastLoadedDPI", "96"));
+
             _splashForm.LoadingStatus.Text = "checking for requirements";
 
             // theming
@@ -1887,19 +1892,19 @@ namespace Optimizer
                             switch (x.Group)
                             {
                                 case "SystemTools":
-                                    appCard.Location = new Point(0, groupSystemTools.Controls.Count * 30);
+                                    appCard.Location = new Point(0, groupSystemTools.Controls.Count * (DPI_PREFERENCE / 3));
                                     groupSystemTools.Controls.Add(appCard);
                                     break;
                                 case "Internet":
-                                    appCard.Location = new Point(0, groupInternet.Controls.Count * 30);
+                                    appCard.Location = new Point(0, groupInternet.Controls.Count * (DPI_PREFERENCE / 3));
                                     groupInternet.Controls.Add(appCard);
                                     break;
                                 case "Coding":
-                                    appCard.Location = new Point(0, groupCoding.Controls.Count * 30);
+                                    appCard.Location = new Point(0, groupCoding.Controls.Count * (DPI_PREFERENCE / 3));
                                     groupCoding.Controls.Add(appCard);
                                     break;
                                 case "GraphicsSound":
-                                    appCard.Location = new Point(0, groupSoundVideo.Controls.Count * 30);
+                                    appCard.Location = new Point(0, groupSoundVideo.Controls.Count * (DPI_PREFERENCE / 3));
                                     groupSoundVideo.Controls.Add(appCard);
                                     break;
                                 default:

+ 1 - 1
Optimizer/Forms/MainForm.resx

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

+ 0 - 2
Optimizer/Forms/SplashForm.Designer.cs

@@ -39,7 +39,6 @@ namespace Optimizer
             // 
             // pictureBox1
             // 
-            this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
             this.pictureBox1.Location = new System.Drawing.Point(181, 108);
             this.pictureBox1.Name = "pictureBox1";
             this.pictureBox1.Size = new System.Drawing.Size(96, 96);
@@ -61,7 +60,6 @@ namespace Optimizer
             // 
             // pictureBox2
             // 
-            this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
             this.pictureBox2.Location = new System.Drawing.Point(37, 12);
             this.pictureBox2.Name = "pictureBox2";
             this.pictureBox2.Size = new System.Drawing.Size(384, 96);

+ 8 - 4
Optimizer/Optimize.cs

@@ -165,7 +165,6 @@ namespace Optimizer
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\SQMLogger", "Start", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\current\device\System", "AllowExperimentation", 0);
 
-            Utilities.DisableProtectedService("DPS");
             Utilities.DisableProtectedService("WdiSystemHost");
             Utilities.DisableProtectedService("WdiServiceHost");
         }
@@ -182,7 +181,6 @@ namespace Optimizer
             Utilities.StartService("dmwappushservice");
             Utilities.StartService("DcpSvc");
 
-            Utilities.EnableProtectedService("DPS");
             Utilities.EnableProtectedService("WdiSystemHost");
             Utilities.EnableProtectedService("WdiServiceHost");
         }
@@ -924,7 +922,7 @@ namespace Optimizer
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}", "SensorPermissionState", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\lfsvc\Service\Configuration", "Status", "0", RegistryValueKind.DWord);
 
-            // Disable biometrics
+            // Disable biometrics (Windows Hello)
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Biometrics", "Enabled", "0", RegistryValueKind.DWord);
 
             // News feeding
@@ -980,6 +978,9 @@ namespace Optimizer
             // Projecting to this PC
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Connect", "AllowProjectionToPC", "0", RegistryValueKind.DWord);
 
+            // Phone Link
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\System", "EnableMmx", 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"))
             {
@@ -1045,7 +1046,7 @@ namespace Optimizer
             Utilities.TryDeleteRegistryValue(true, @"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}", "SensorPermissionState");
             Utilities.TryDeleteRegistryValue(true, @"System\CurrentControlSet\Services\lfsvc\Service\Configuration", "Status");
 
-            // Enable biometrics
+            // Enable biometrics (Windows Hello)
             Utilities.TryDeleteRegistryValue(true, @"SOFTWARE\Policies\Microsoft\Biometrics", "Enabled");
 
             // Turn off KMS Client Online AVS Validation
@@ -1102,6 +1103,9 @@ namespace Optimizer
 
             // Projecting to this PC
             Utilities.TryDeleteRegistryValue(true, @"SOFTWARE\Policies\Microsoft\Windows\Connect", "AllowProjectionToPC");
+
+            // Phone Link
+            Utilities.TryDeleteRegistryValue(true, @"Software\Policies\Microsoft\Windows\System", "EnableMmx");
         }
 
         internal static void DisableGameBar()

+ 25 - 1
Optimizer/Program.cs

@@ -13,7 +13,7 @@ namespace Optimizer
         /* DO NOT LEAVE THEM EMPTY */
 
         internal readonly static float Major = 13;
-        internal readonly static float Minor = 6;
+        internal readonly static float Minor = 7;
 
         internal readonly static bool EXPERIMENTAL_BUILD = false;
 
@@ -128,6 +128,7 @@ namespace Optimizer
                             catch (Exception ex)
                             {
                                 ErrorLogger.LogError("Program.Main", ex.Message, ex.StackTrace);
+                                Environment.Exit(0);
                             }
 
                             for (int z = 0; z < switches.Length; z++) switches[z] = switches[z].ToLowerInvariant();
@@ -151,6 +152,29 @@ namespace Optimizer
                                     return;
                                 }
 
+                                if (arg == "/disablehpet")
+                                {
+                                    Utilities.DisableHPET();
+                                    Environment.Exit(0);
+                                }
+                                if (arg == "/enablehpet")
+                                {
+                                    Utilities.EnableHPET();
+                                    Environment.Exit(0);
+                                }
+
+                                if (arg == "/addstartup")
+                                {
+                                    Utilities.AddToStartup();
+                                    Environment.Exit(0);
+                                }
+
+                                if (arg == "/deletestartup")
+                                {
+                                    Utilities.DeleteFromStartup();
+                                    Environment.Exit(0);
+                                }
+
                                 // [!!!] unlock all cores instruction 
                                 if (arg == "/unlockcores")
                                 {

+ 44 - 0
Optimizer/Utilities.cs

@@ -668,6 +668,20 @@ namespace Optimizer
             catch { }
         }
 
+        internal static void DisableHPET()
+        {
+            Utilities.RunCommand("bcdedit /deletevalue useplatformclock");
+            Thread.Sleep(500);
+            Utilities.RunCommand("bcdedit /set disabledynamictick yes");
+        }
+
+        internal static void EnableHPET()
+        {
+            Utilities.RunCommand("bcdedit /set useplatformclock true");
+            Thread.Sleep(500);
+            Utilities.RunCommand("bcdedit /set disabledynamictick no");
+        }
+
         // [!!!]
         //internal static void ChangeNumberOfSvcHostByRAM(string ram)
         //{
@@ -679,6 +693,36 @@ namespace Optimizer
         //    catch { }
         //}
 
+        internal static void AddToStartup()
+        {
+            try
+            {
+                using (RegistryKey k = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true))
+                {
+                    k.SetValue("Optimizer", Assembly.GetEntryAssembly().Location);
+                }
+            }
+            catch (Exception ex)
+            {
+                ErrorLogger.LogError("Utilities.AddToStartup", ex.Message, ex.StackTrace);
+            }
+        }
+
+        internal static void DeleteFromStartup()
+        {
+            try
+            {
+                using (RegistryKey k = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true))
+                {
+                    k.DeleteValue("Optimizer", false);
+                }
+            }
+            catch (Exception ex)
+            {
+                ErrorLogger.LogError("Utilities.DeleteFromStartup", ex.Message, ex.StackTrace);
+            }
+        }
+
         internal static void PreventProcessFromRunning(string pName)
         {
             try

+ 4 - 4
README.md

@@ -3,7 +3,7 @@
 </p> 
 
 <p align="center">
-	<a href="https://github.com/hellzerg/optimizer/releases/download/13.6/Optimizer-13.6.exe" target="_blank">
+	<a href="https://github.com/hellzerg/optimizer/releases/download/13.7/Optimizer-13.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">
@@ -88,9 +88,9 @@ https://github.com/hellzerg/optimizer/blob/master/LEGACY.md
 
 ### #️ Details: ###
 
-* Latest version: 13.6
-* Released: June 12, 2022
-* SHA256: 0F65506AE84F5A4D358AF18BFE00A80565FDF3F7F787362BF17187C28CAE3029
+* Latest version: 13.7
+* Released: August 5, 2022
+* SHA256: 955C1A6BC086DE6B112F16879BB7553854F7BB0F2642B1F18CC0167BB85A519D
 
 <hr>
 

+ 1 - 1
version.txt

@@ -1 +1 @@
-13.6
+13.7

Some files were not shown because too many files changed in this diff