deadmoon 4 vuotta sitten
vanhempi
sitoutus
9eab325cea

+ 6 - 0
CHANGELOG.md

@@ -2,6 +2,12 @@
 
 All notable changes to this project will be documented in this file.
 
+## [7.3] - 2021-04-11
+- New: Flush DNS cache (Pinger)
+- Hotfix: Some tabs not working when offline
+- Several improvements on Windows 10 privacy
+- Removed unnecessary timers
+
 ## [7.2] - 2021-04-10
 - LICENSES are now visible in Options
 - Check for update on launch 

+ 1 - 1
Optimizer/AboutForm.cs

@@ -1,6 +1,6 @@
 using System;
-using System.Windows.Forms;
 using System.Diagnostics;
+using System.Windows.Forms;
 
 namespace Optimizer
 {

+ 1 - 4
Optimizer/ByteSize/DecimalByteSize.cs

@@ -1,7 +1,4 @@
-using System;
-using System.Globalization;
-
-namespace Optimizer
+namespace Optimizer
 {
     public partial struct ByteSize
     {

+ 1 - 10
Optimizer/CleanHelper.cs

@@ -2,7 +2,6 @@
 using System.IO;
 using System.Linq;
 using System.Runtime.InteropServices;
-using System.Threading.Tasks;
 
 namespace Optimizer
 {
@@ -56,15 +55,6 @@ namespace Optimizer
         internal static void CleanTemporaries()
         {
             EmptyFolder(TempFolder);
-        } 
-
-        internal static void CleanFileZilla()
-        {
-            try
-            {
-                File.Delete(ProfileAppDataRoaming + "\\FileZilla\\recentservers.xml");
-            }
-            catch { }
         }
 
         internal static void CleanMiniDumps()
@@ -103,6 +93,7 @@ namespace Optimizer
             EmptyFolder(OSDrive + "\\inetpub\\logs\\LogFiles");
         }
 
+        // only for TEMP folder
         internal static ByteSize CheckFootprint()
         {
             try

+ 0 - 4
Optimizer/ColoredControls/ColoredCheckBox.cs

@@ -1,8 +1,4 @@
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using System.Drawing;
 using System.Windows.Forms;
 

+ 0 - 4
Optimizer/ColoredControls/ColoredRadioButton.cs

@@ -1,8 +1,4 @@
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using System.Drawing;
 using System.Windows.Forms;
 

+ 1 - 6
Optimizer/ColoredControls/ToolStripRendererMaterial.cs

@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Drawing;
 using System.Windows.Forms;
 
 namespace Optimizer

+ 0 - 1
Optimizer/EmbeddedAssembly.cs

@@ -1,6 +1,5 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
 using System.IO;
 using System.Reflection;
 using System.Security.Cryptography;

+ 0 - 4
Optimizer/ErrorLogger.cs

@@ -1,8 +1,4 @@
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using System.IO;
 
 namespace Optimizer

+ 1 - 7
Optimizer/FeedApp.cs

@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Optimizer
+namespace Optimizer
 {
     public class FeedApp
     {

+ 0 - 1
Optimizer/HostsEditorForm.cs

@@ -1,5 +1,4 @@
 using System;
-using System.IO;
 using System.Windows.Forms;
 
 namespace Optimizer

+ 3 - 3
Optimizer/HostsHelper.cs

@@ -1,11 +1,11 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
 using System.IO;
-using System.Text.RegularExpressions;
+using System.Linq;
+using System.Net;
 using System.Text;
+using System.Text.RegularExpressions;
 using System.Windows.Forms;
-using System.Net;
 
 namespace Optimizer
 {

+ 5 - 5
Optimizer/Integrator.cs

@@ -1,11 +1,11 @@
-using System;
+using Microsoft.Win32;
+using System;
 using System.Collections.Generic;
-using System.IO;
-using Microsoft.Win32;
-using System.Windows.Forms;
 using System.Drawing;
-using System.Net;
 using System.Drawing.Imaging;
+using System.IO;
+using System.Net;
+using System.Windows.Forms;
 
 namespace Optimizer
 {

+ 32 - 42
Optimizer/MainForm.Designer.cs

@@ -318,8 +318,6 @@
             this.DefineURLIconDialog = new System.Windows.Forms.OpenFileDialog();
             this.DefineFileIconDialog = new System.Windows.Forms.OpenFileDialog();
             this.DefineCommandIconDialog = new System.Windows.Forms.OpenFileDialog();
-            this.integratorTimer = new System.Windows.Forms.Timer(this.components);
-            this.runDialogTime = new System.Windows.Forms.Timer(this.components);
             this.ExportDialog = new System.Windows.Forms.SaveFileDialog();
             this.launcherMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
             this.startupItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -458,7 +456,6 @@
             this.cZoom = new Optimizer.ColoredCheckBox();
             this.cTV = new Optimizer.ColoredCheckBox();
             this.checkErrorReports = new Optimizer.ColoredCheckBox();
-            this.checkFileZilla = new Optimizer.ColoredCheckBox();
             this.checkSelectAll = new Optimizer.ColoredCheckBox();
             this.checkMediaCache = new Optimizer.ColoredCheckBox();
             this.checkTemp = new Optimizer.ColoredCheckBox();
@@ -488,6 +485,7 @@
             this.radioFile = new Optimizer.ColoredRadioButton();
             this.radioLink = new Optimizer.ColoredRadioButton();
             this.quickAccessToggle = new Optimizer.ToggleSwitch();
+            this.button10 = new System.Windows.Forms.Button();
             this.tpanel.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             this.bpanel.SuspendLayout();
@@ -904,7 +902,7 @@
             this.panel9.Controls.Add(this.label46);
             this.panel9.Controls.Add(this.label45);
             this.panel9.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.panel9.Location = new System.Drawing.Point(2, 569);
+            this.panel9.Location = new System.Drawing.Point(2, 567);
             this.panel9.Name = "panel9";
             this.panel9.Size = new System.Drawing.Size(754, 42);
             this.panel9.TabIndex = 72;
@@ -2648,7 +2646,6 @@
             this.panel1.Controls.Add(this.lblPretext);
             this.panel1.Controls.Add(this.lblFootprint);
             this.panel1.Controls.Add(this.checkErrorReports);
-            this.panel1.Controls.Add(this.checkFileZilla);
             this.panel1.Controls.Add(this.button20);
             this.panel1.Controls.Add(this.checkSelectAll);
             this.panel1.Controls.Add(this.checkMediaCache);
@@ -2708,6 +2705,7 @@
             // pingerTab
             // 
             this.pingerTab.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
+            this.pingerTab.Controls.Add(this.button10);
             this.pingerTab.Controls.Add(this.btnExport);
             this.pingerTab.Controls.Add(this.button9);
             this.pingerTab.Controls.Add(this.button7);
@@ -2733,7 +2731,7 @@
             this.btnExport.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.btnExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.btnExport.ForeColor = System.Drawing.Color.White;
-            this.btnExport.Location = new System.Drawing.Point(499, 510);
+            this.btnExport.Location = new System.Drawing.Point(499, 512);
             this.btnExport.Margin = new System.Windows.Forms.Padding(2);
             this.btnExport.Name = "btnExport";
             this.btnExport.Size = new System.Drawing.Size(71, 29);
@@ -3371,7 +3369,7 @@
             this.synapse.Multiline = true;
             this.synapse.Name = "synapse";
             this.synapse.SelectedIndex = 0;
-            this.synapse.Size = new System.Drawing.Size(754, 609);
+            this.synapse.Size = new System.Drawing.Size(754, 607);
             this.synapse.TabIndex = 0;
             // 
             // integratorInfoTab
@@ -3388,7 +3386,7 @@
             this.integratorInfoTab.Margin = new System.Windows.Forms.Padding(2);
             this.integratorInfoTab.Name = "integratorInfoTab";
             this.integratorInfoTab.Padding = new System.Windows.Forms.Padding(2);
-            this.integratorInfoTab.Size = new System.Drawing.Size(746, 581);
+            this.integratorInfoTab.Size = new System.Drawing.Size(746, 579);
             this.integratorInfoTab.TabIndex = 0;
             this.integratorInfoTab.Text = "Info";
             // 
@@ -3496,7 +3494,7 @@
             this.tabPage8.Margin = new System.Windows.Forms.Padding(2);
             this.tabPage8.Name = "tabPage8";
             this.tabPage8.Padding = new System.Windows.Forms.Padding(2);
-            this.tabPage8.Size = new System.Drawing.Size(746, 581);
+            this.tabPage8.Size = new System.Drawing.Size(746, 579);
             this.tabPage8.TabIndex = 1;
             this.tabPage8.Text = "Add/Modify";
             // 
@@ -3508,7 +3506,7 @@
             this.btnAddItem.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.btnAddItem.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.btnAddItem.ForeColor = System.Drawing.Color.White;
-            this.btnAddItem.Location = new System.Drawing.Point(512, 438);
+            this.btnAddItem.Location = new System.Drawing.Point(410, 473);
             this.btnAddItem.Margin = new System.Windows.Forms.Padding(2);
             this.btnAddItem.Name = "btnAddItem";
             this.btnAddItem.Size = new System.Drawing.Size(98, 31);
@@ -4066,7 +4064,7 @@
             this.tabPage11.Margin = new System.Windows.Forms.Padding(2);
             this.tabPage11.Name = "tabPage11";
             this.tabPage11.Padding = new System.Windows.Forms.Padding(2);
-            this.tabPage11.Size = new System.Drawing.Size(746, 581);
+            this.tabPage11.Size = new System.Drawing.Size(746, 579);
             this.tabPage11.TabIndex = 4;
             this.tabPage11.Text = "Run Dialog";
             // 
@@ -4306,9 +4304,9 @@
             this.pictureBox84.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
             this.pictureBox84.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox84.BackgroundImage")));
             this.pictureBox84.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
-            this.pictureBox84.Location = new System.Drawing.Point(602, 313);
+            this.pictureBox84.Location = new System.Drawing.Point(619, 313);
             this.pictureBox84.Name = "pictureBox84";
-            this.pictureBox84.Size = new System.Drawing.Size(145, 114);
+            this.pictureBox84.Size = new System.Drawing.Size(128, 114);
             this.pictureBox84.TabIndex = 67;
             this.pictureBox84.TabStop = false;
             // 
@@ -4617,16 +4615,6 @@
             this.DefineCommandIconDialog.Title = "Optimizer | Select an icon or program...";
             this.DefineCommandIconDialog.FileOk += new System.ComponentModel.CancelEventHandler(this.DefineCommandIconDialog_FileOk);
             // 
-            // integratorTimer
-            // 
-            this.integratorTimer.Interval = 5;
-            this.integratorTimer.Tick += new System.EventHandler(this.integratorTimer_Tick);
-            // 
-            // runDialogTime
-            // 
-            this.runDialogTime.Interval = 5;
-            this.runDialogTime.Tick += new System.EventHandler(this.runDialogTimer_Tick);
-            // 
             // ExportDialog
             // 
             this.ExportDialog.Filter = "Text [*.txt]|*.txt";
@@ -4648,7 +4636,7 @@
             this.exitItem});
             this.launcherMenu.Name = "launcherMenu";
             this.launcherMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
-            this.launcherMenu.Size = new System.Drawing.Size(215, 214);
+            this.launcherMenu.Size = new System.Drawing.Size(215, 192);
             // 
             // startupItem
             // 
@@ -5115,7 +5103,7 @@
             this.toggleSwitch21.OffForeColor = System.Drawing.Color.White;
             this.toggleSwitch21.OnFont = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.toggleSwitch21.OnForeColor = System.Drawing.Color.White;
-            this.toggleSwitch21.OnText = "Disable Privacy Options";
+            this.toggleSwitch21.OnText = "Enhance Privacy";
             this.toggleSwitch21.Size = new System.Drawing.Size(208, 31);
             this.toggleSwitch21.TabIndex = 50;
             this.toggleSwitch21.Tag = "themeable";
@@ -6274,7 +6262,7 @@
             this.checkErrorReports.AutoSize = true;
             this.checkErrorReports.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.checkErrorReports.ForeColor = System.Drawing.Color.White;
-            this.checkErrorReports.Location = new System.Drawing.Point(55, 133);
+            this.checkErrorReports.Location = new System.Drawing.Point(256, 104);
             this.checkErrorReports.Margin = new System.Windows.Forms.Padding(2);
             this.checkErrorReports.Name = "checkErrorReports";
             this.checkErrorReports.Size = new System.Drawing.Size(123, 25);
@@ -6282,19 +6270,6 @@
             this.checkErrorReports.Text = "Error reports";
             this.checkErrorReports.UseVisualStyleBackColor = true;
             // 
-            // checkFileZilla
-            // 
-            this.checkFileZilla.AutoSize = true;
-            this.checkFileZilla.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.checkFileZilla.ForeColor = System.Drawing.Color.White;
-            this.checkFileZilla.Location = new System.Drawing.Point(256, 104);
-            this.checkFileZilla.Margin = new System.Windows.Forms.Padding(2);
-            this.checkFileZilla.Name = "checkFileZilla";
-            this.checkFileZilla.Size = new System.Drawing.Size(191, 25);
-            this.checkFileZilla.TabIndex = 38;
-            this.checkFileZilla.Text = "FileZilla recent servers";
-            this.checkFileZilla.UseVisualStyleBackColor = true;
-            // 
             // checkSelectAll
             // 
             this.checkSelectAll.AutoSize = true;
@@ -6683,6 +6658,23 @@
             this.quickAccessToggle.Tag = "themeable";
             this.quickAccessToggle.CheckedChanged += new Optimizer.ToggleSwitch.CheckedChangedDelegate(this.quickAccessToggle_CheckedChanged);
             // 
+            // button10
+            // 
+            this.button10.BackColor = System.Drawing.Color.DodgerBlue;
+            this.button10.FlatAppearance.BorderColor = System.Drawing.Color.DodgerBlue;
+            this.button10.FlatAppearance.MouseDownBackColor = System.Drawing.Color.RoyalBlue;
+            this.button10.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
+            this.button10.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.button10.ForeColor = System.Drawing.Color.White;
+            this.button10.Location = new System.Drawing.Point(26, 512);
+            this.button10.Margin = new System.Windows.Forms.Padding(2);
+            this.button10.Name = "button10";
+            this.button10.Size = new System.Drawing.Size(139, 29);
+            this.button10.TabIndex = 84;
+            this.button10.Text = "Flush DNS cache";
+            this.button10.UseVisualStyleBackColor = false;
+            this.button10.Click += new System.EventHandler(this.button10_Click);
+            // 
             // MainForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@@ -6896,7 +6888,6 @@
         private ColoredCheckBox checkLogs;
         private ColoredCheckBox checkBin;
         private ColoredCheckBox checkMiniDumps;
-        private ColoredCheckBox checkFileZilla;
         private System.Windows.Forms.Panel panel1;
         private System.Windows.Forms.Label label4;
         private System.Windows.Forms.ProgressBar progress2;
@@ -7015,8 +7006,6 @@
         internal System.Windows.Forms.OpenFileDialog DefineURLIconDialog;
         internal System.Windows.Forms.OpenFileDialog DefineFileIconDialog;
         internal System.Windows.Forms.OpenFileDialog DefineCommandIconDialog;
-        private System.Windows.Forms.Timer integratorTimer;
-        private System.Windows.Forms.Timer runDialogTime;
         private System.Windows.Forms.Button button64;
         private System.Windows.Forms.Button button65;
         private System.Windows.Forms.Button button66;
@@ -7331,6 +7320,7 @@
         private System.Windows.Forms.Panel panel9;
         private System.Windows.Forms.ToolStripMenuItem restartExpolorerItem;
         private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+        private System.Windows.Forms.Button button10;
     }
 }
 

+ 32 - 68
Optimizer/MainForm.cs

@@ -1,19 +1,16 @@
-using System;
+using Newtonsoft.Json;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-using System.IO;
-using System.Reflection;
 using System.Diagnostics;
-using System.Net;
-using System.Threading;
+using System.IO;
 using System.Linq;
-using System.Drawing;
-using Timer = System.Windows.Forms.Timer;
-using Newtonsoft.Json;
+using System.Net;
 using System.Net.NetworkInformation;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
 
 namespace Optimizer
 {
@@ -406,12 +403,12 @@ namespace Optimizer
             GetStartupItems();
             GetHostsEntries();
 
-            integratorTimer.Start();
-            runDialogTime.Start();
-
             GetDesktopItems();
             GetCustomCommands();
 
+            GetFeed();
+            GetFootprint();
+
             LoadSettings();
 
             txtVersion.Text = "Version: " + Program.GetCurrentVersionTostring();
@@ -436,10 +433,7 @@ namespace Optimizer
                 txtDownloadFolder.Text = Options.CurrentOptions.AppsFolder;
             }
 
-            GetFeed();
-            GetFootprint();
-
-            if (!Program.EXPERIMENTAL_BUILD) CheckForUpdate(true);
+            if (!Program.EXPERIMENTAL_BUILD && Utilities.IsInternetAvailable()) CheckForUpdate(true);
 
             if (Program.EXPERIMENTAL_BUILD)
             {
@@ -467,12 +461,6 @@ namespace Optimizer
                 AppsFromFeed = JsonConvert.DeserializeObject<List<FeedApp>>(feed);
 
                 // UI handling
-                panel1.Visible = true;
-                panel2.Visible = true;
-                panel3.Visible = true;
-                panel4.Visible = true;
-                panel5.Visible = true;
-                panel6.Visible = true;
                 label42.Visible = true;
                 label44.Visible = true;
                 txtDownloadFolder.Visible = true;
@@ -490,12 +478,6 @@ namespace Optimizer
             }
             catch (Exception ex)
             {
-                panel1.Visible = false;
-                panel2.Visible = false;
-                panel3.Visible = false;
-                panel4.Visible = false;
-                panel5.Visible = false;
-                panel6.Visible = false;
                 label42.Visible = false;
                 label44.Visible = false;
                 txtDownloadFolder.Visible = false;
@@ -522,10 +504,6 @@ namespace Optimizer
                 {
                     CleanHelper.CleanTemporaries();
                 }
-                if (checkFileZilla.Checked)
-                {
-                    CleanHelper.CleanFileZilla();
-                }
                 if (checkMiniDumps.Checked)
                 {
                     CleanHelper.CleanMiniDumps();
@@ -691,7 +669,7 @@ namespace Optimizer
 
         private void Main_Load(object sender, EventArgs e)
         {
-            
+
         }
 
         private void GetDesktopItems()
@@ -874,7 +852,6 @@ namespace Optimizer
         private void checkSelectAll_CheckedChanged(object sender, EventArgs e)
         {
             checkTemp.Checked = checkSelectAll.Checked;
-            checkFileZilla.Checked = checkSelectAll.Checked;
             checkMiniDumps.Checked = checkSelectAll.Checked;
             checkMediaCache.Checked = checkSelectAll.Checked;
             checkLogs.Checked = checkSelectAll.Checked;
@@ -1067,7 +1044,7 @@ namespace Optimizer
 
         private void button50_Click(object sender, EventArgs e)
         {
-            if ((txtRunFile.Text != string.Empty) && (txtRunKeyword.Text != string.Empty))
+            if (!string.IsNullOrEmpty(txtRunFile.Text) && !string.IsNullOrEmpty(txtRunKeyword.Text))
             {
                 Integrator.CreateCustomCommand(txtRunFile.Text, txtRunKeyword.Text);
 
@@ -1394,6 +1371,16 @@ namespace Optimizer
 
         private void btnAddItem_Click(object sender, EventArgs e)
         {
+            if (!checkDefaultIcon.Checked && (string.IsNullOrEmpty(txtItem.Text) || string.IsNullOrEmpty(txtItemName.Text) || string.IsNullOrEmpty(txtIcon.Text)))
+            {
+                return;
+            }
+
+            if (checkDefaultIcon.Checked && (string.IsNullOrEmpty(txtItem.Text) || string.IsNullOrEmpty(txtItemName.Text)))
+            {
+                return;
+            }
+
             string icon = string.Empty;
 
             switch (_desktopItemType)
@@ -1461,34 +1448,6 @@ namespace Optimizer
             ResetIntegratorForm();
         }
 
-        private void integratorTimer_Tick(object sender, EventArgs e)
-        {
-            if ((txtItem.Text != "") && (txtItemName.Text != "") && (txtIcon.Text != "") && (!checkDefaultIcon.Checked))
-            {
-                btnAddItem.Enabled = true;
-            }
-            else if ((txtItem.Text != "") && (txtItemName.Text != "") && (checkDefaultIcon.Checked))
-            {
-                btnAddItem.Enabled = true;
-            }
-            else
-            {
-                btnAddItem.Enabled = false;
-            }
-        }
-
-        private void runDialogTimer_Tick(object sender, EventArgs e)
-        {
-            if ((txtRunFile.Text != "") && (txtRunKeyword.Text != ""))
-            {
-                btnCreateCustomCommand.Enabled = true;
-            }
-            else
-            {
-                btnCreateCustomCommand.Enabled = false;
-            }
-        }
-
         private void radioTop_CheckedChanged(object sender, EventArgs e)
         {
             if (radioTop.Checked)
@@ -2227,7 +2186,7 @@ namespace Optimizer
                 if (c is ColoredCheckBox && ((ColoredCheckBox)c).Checked) ((ColoredCheckBox)c).Checked = false;
             }
 
-            RenderAppDownloaderFree();  
+            RenderAppDownloaderFree();
         }
 
         string fileExtension = ".exe";
@@ -2392,7 +2351,7 @@ namespace Optimizer
                 listPingResults.Items.Add(string.Format("Could not find host [{0}]", txtPingInput.Text));
                 return;
             }
-            
+
             Task pinger = new Task(() =>
             {
                 btnShodan.Enabled = false;
@@ -2453,7 +2412,7 @@ namespace Optimizer
                 Process.Start(string.Format("https://www.shodan.io/host/{0}", txtPingInput.Text));
                 return;
             }
-            
+
             if (!string.IsNullOrEmpty(_shodanIP))
             {
                 Process.Start(string.Format("https://www.shodan.io/host/{0}", _shodanIP));
@@ -2591,5 +2550,10 @@ namespace Optimizer
         {
             Utilities.RestartExplorer();
         }
+
+        private void button10_Click(object sender, EventArgs e)
+        {
+            Utilities.FlushDNSCache();
+        }
     }
 }

+ 25 - 31
Optimizer/MainForm.resx

@@ -45252,12 +45252,6 @@ any application only by typing your desired keyword.</value>
   <metadata name="DefineCommandIconDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 56</value>
   </metadata>
-  <metadata name="integratorTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>219, 56</value>
-  </metadata>
-  <metadata name="runDialogTime.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>356, 56</value>
-  </metadata>
   <metadata name="ExportDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>1152, 17</value>
   </metadata>
@@ -45396,31 +45390,31 @@ any application only by typing your desired keyword.</value>
   </data>
   <data name="restartExpolorerItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
-        iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAVaSURBVHhe7ZxhchM7EAbDuzh3zIXyyqSLOLi9WY1mbc16
-        uqp/IX0z0ggIDvDWfOf9/f1jS5Y1Z8QGbrK8ORM26C3Z1pwBG/Ae2d5UxgY7IjFNVWyooxLVVMQGGpG4
-        phIfbx+/bJhRiW2qYEOcleimCjbEWYluKmADzJD4ZnVseFlSolmZ378//rPhZUmZZmVscJlSplkZG1ym
-        lGlWxgaXKWWalbHBZUqZZmVscJlSplkZG1ymlGlWJ/v7BddSorlgF/QKcvzXxC7kFeU6XgO7gPbkj8AO
-        3N7KdZ0HO2S7LVdXm6O/wXJmucK62KHa/XKN9bDDtONynbWwg7QxudI62CHauFzr+hz5Eekry/WujTXe
-        5sgVbzK6PpXr4m2uXLFi6/+VpcdhRds8ueYbbO2WbMulf88/Vq75Blv7k5dZsT0PK9TmyBXfYGv3SkQO
-        VuBZ0tJDsT6ypIRi60ckZg4LPlpKP5VH/JZHKcXWRyQuhgUeJSWX4NnDv2B7ohI5joVlS6llWGH4F2xf
-        VCLHsKBMKbMUqwz/gu2dkdh9HPn9fEosx0rDv2D7ZyX6Z2xzhsQvifWbKWV2c8SDJHob25gh8Uti/WZK
-        mWEsa1ai72ObZiV6SazfTCkTwvJmJdqxDbMSvSzWc5aUmMJyZyX6Fls8I7FLY31nSHwKlj8jsbfY4qhE
-        Ls1RX/kTn4rViUrkd2xhVCKXx3qfleh0rNaMxH5hi6ISWQLrPyqRh2E1oxL5hS2KSFwZ7AwRiTscqx2R
-        uE9sQVQiy2BnGJWoh2D1oxJZ72dBJrMfexPzUKyPiMS99gO4YGfZI9sfjvUSMT+sMHamLdn2NKyniP0A
-        rrBzmSx/KtZXxH4Ad1j9fP/2FzUliJ6aB2OzGLUfQGFsFqP2AyiMzWLUfgCFsVmM2g+gMDaLUfsBFMZm
-        MWo/gMLYLEadDrl8lk4/zYOxeYzavwIUxmYxaj+AwtgsRu0HUBibxaj9AApjsxi1H0BhbBaj9gMojM1i
-        1JSQi/TUPAibQcTTPQDr7VqWlcfOFjHtX8fQ19OwnrZkW1nsTKP+/RDPfjDin7AnYL3ske3lsLNEJK72
-        A7A+9kpEOewsEYnLC7xI5EOw+qMSVQY7Q1QiP7EFEYk7HKsdkbgy2BkiEveFLYpK5GFYzahElsD6j0rk
-        F7YoKpGHYPVmJHZ5rPcZif2OLYxKZCpWZ1ail8d6j0rkLbZ4RmJTsPwMiV8a63tGYm+xxbMSPYXlZkmJ
-        ZbGeZyXasQ0zzv6VMcvMlDJLYv3OSvR9bNOsRA9jWZlSZkms3wyJ38Y2zkjsEJaTLaWWw3rNkPifedr/
-        Uwu2P1tKLYX1meVlppTZh4XMSOyP2N5sKbUU1memlBnDgqISuYnty5ZSy2A9ZkupcSws4p4/Cdi+bCm1
-        BNbfUVIyhgWOStRdbE+2lHoq1tfRUnoOCx6RGMXWZ0mJh2J9PEtaysEK7JHtiq1vc+SK84j+0ZDtN9ja
-        Nkeu+Bis4D3ZcoOtbfPkmo/Dil7LsrvYnjZHrnhdrOk2R654bazxds7hj3mfiR2gjcu11sAO0MblWutg
-        h2hjcqX1sMO0++Ua62KHan+21Bd6W9jh2m25uvNgh2xv5brOhx22/ZQrOj92+FeVK3k97DJewdN8QZeB
-        XVCWfdFFsOFlS6lmVWxo2VKqWRUbWraUalbFhpYtpZpVsaFlS6lmVWxo2VKqWRUbWqaUaVbGBpcpZZqV
-        scFlSYlmdWx4GRLfVMAGOCvRTRVsiDMS21TCBhmVyKYaNsyIxDUVsYGOSlRTFRvqXoloqmPD3SPbmzNg
-        A96Sbc3ZsGFfy7LmD29v/wN7mGE386/iiwAAAABJRU5ErkJggg==
+        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
+        b2//A3uYYTfzr+KLAAAAAElFTkSuQmCC
 </value>
   </data>
   <data name="exitItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

+ 52 - 16
Optimizer/Optimize.cs

@@ -1,9 +1,8 @@
-using System;
+using Microsoft.VisualBasic.FileIO;
+using Microsoft.Win32;
+using System;
 using System.Diagnostics;
 using System.IO;
-using Microsoft.Win32;
-using Microsoft.VisualBasic.FileIO;
-using System.Security.AccessControl;
 
 namespace Optimizer
 {
@@ -53,6 +52,9 @@ namespace Optimizer
 
         internal static void EnablePerformanceTweaks()
         {
+            // disable shaking to minimize
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "DisallowShaking", "1", RegistryValueKind.DWord);
+
             Registry.SetValue("HKEY_CLASSES_ROOT\\AllFilesystemObjects\\shellex\\ContextMenuHandlers\\Copy To", "", "{C2FBB630-2971-11D1-A18C-00C04FD75D13}");
             Registry.SetValue("HKEY_CLASSES_ROOT\\AllFilesystemObjects\\shellex\\ContextMenuHandlers\\Move To", "", "{C2FBB631-2971-11D1-A18C-00C04FD75D13}");
 
@@ -92,6 +94,9 @@ namespace Optimizer
         {
             try
             {
+                // disable shaking to minimize
+                Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "DisallowShaking", "0", RegistryValueKind.DWord);
+
                 Registry.ClassesRoot.DeleteSubKeyTree(@"AllFilesystemObjects\\shellex\\ContextMenuHandlers\\Copy To", false);
                 Registry.ClassesRoot.DeleteSubKeyTree(@"AllFilesystemObjects\\shellex\\ContextMenuHandlers\\Move To", false);
 
@@ -150,6 +155,7 @@ namespace Optimizer
             Utilities.RunCommand("reg add \"HKLM\\Software\\Microsoft\\PolicyManager\\default\\WiFi\\AllowAutoConnectToWiFiSenseHotspots\" /v value /t REG_DWORD /d 0 /f");
             Utilities.RunCommand("reg add \"HKLM\\Software\\Microsoft\\PolicyManager\\default\\WiFi\\AllowWiFiHotSpotReporting\" /v value /t REG_DWORD /d 0 /f");
 
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System", "PublishUserActivities", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\SQMClient\Windows", "CEIPEnable", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\AppCompat", "AITEnable", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\AppCompat", "DisableUAR", "1", RegistryValueKind.DWord);
@@ -420,12 +426,18 @@ namespace Optimizer
 
         internal static void EnableTaskbarColor()
         {
+            // disable transparency
+            Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "EnableTransparency", "0", RegistryValueKind.DWord);
+
             Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM", "ColorPrevalence", "00000001", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "ColorPrevalence", "00000000", RegistryValueKind.DWord);
         }
 
         internal static void DisableTaskbarColor()
         {
+            // enable transparency
+            Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "EnableTransparency", "1", RegistryValueKind.DWord);
+
             Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM", "ColorPrevalence", "00000000", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "ColorPrevalence", "00000001", RegistryValueKind.DWord);
         }
@@ -468,7 +480,7 @@ namespace Optimizer
             Registry.ClassesRoot.CreateSubKey(rootKey);
             int byteArray = BitConverter.ToInt32(BitConverter.GetBytes(0xb090010d), 0);
             var reg = RegistryKey.OpenBaseKey(RegistryHive.ClassesRoot, RegistryView.Registry64);
-            
+
             try
             {
                 using (var key = Registry.ClassesRoot.OpenSubKey(rootKey, true))
@@ -496,7 +508,7 @@ namespace Optimizer
                     using (var key = reg.OpenSubKey(rootKey, true))
                     {
                         if (key != null)
-                        { 
+                        {
                             key.SetValue("System.IsPinnedToNameSpaceTree", 0, RegistryValueKind.DWord);
                         }
                     }
@@ -541,6 +553,7 @@ namespace Optimizer
 
         internal static void DisableCortana()
         {
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\SearchSettings", "IsDeviceSearchHistoryEnabled", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search", "AllowCortana", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search", "DisableWebSearch", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search", "ConnectedSearchUseWeb", "0", RegistryValueKind.DWord);
@@ -611,6 +624,7 @@ namespace Optimizer
 
         internal static void DisableAutomaticUpdates()
         {
+            Registry.SetValue(@"HKEY_USERS\S-1-5-20\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Settings", "DownloadMode", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings", "UxOption", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "NoAutoUpdate", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "AUOptions", "2", RegistryValueKind.DWord);
@@ -741,6 +755,17 @@ namespace Optimizer
 
         internal static void DisablePrivacyOptions()
         {
+            // Disable biometrics
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Biometrics", "Enabled", "0", RegistryValueKind.DWord);
+
+            // News feeding
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Feeds", "ShellFeedsTaskbarOpenOnHover", "0", RegistryValueKind.DWord);
+
+            // Turn off share apps across devices
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\CDP", "CdpSessionUserAuthzPolicy", "0", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\CDP", "NearShareChannelUserAuthzPolicy", "0", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\CDP", "RomeSdkChannelUserAuthzPolicy", "0", RegistryValueKind.DWord);
+
             // Turn off KMS Client Online AVS Validation
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform", "NoGenTicket", "1", RegistryValueKind.DWord);
 
@@ -764,6 +789,7 @@ namespace Optimizer
             Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\LooselyCoupled", "Value", "Deny", RegistryValueKind.String);
 
             // Feedback & diagnostics
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System", "UploadUserActivities", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Siuf\Rules", "PeriodInNanoSeconds", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Siuf\Rules", "NumberOfSIUFInPeriod", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection", "AllowTelemetry", "0", RegistryValueKind.DWord);
@@ -787,6 +813,16 @@ namespace Optimizer
 
         internal static void EnablePrivacyOptions()
         {
+            // Enable biometrics
+            try
+            {
+                Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Policies\Microsoft\Biometrics", true).DeleteValue("Enabled", false);
+            }
+            catch (Exception ex)
+            {
+                ErrorLogger.LogError("Optimize.EnablePrivacyOptions", ex.Message, ex.StackTrace);
+            }
+
             // Turn off KMS Client Online AVS Validation
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform", "NoGenTicket", "0", RegistryValueKind.DWord);
 
@@ -857,6 +893,7 @@ namespace Optimizer
 
         internal static void DisableQuickAccessHistory()
         {
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager", "EnthusiastMode", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowSyncProviderNotifications", "0", RegistryValueKind.DWord);
 
             using (RegistryKey k = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer", true))
@@ -873,6 +910,7 @@ namespace Optimizer
 
         internal static void EnableQuickAccessHistory()
         {
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager", "EnthusiastMode", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowSyncProviderNotifications", "1", RegistryValueKind.DWord);
 
             using (RegistryKey k = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer", true))
@@ -890,30 +928,28 @@ namespace Optimizer
         internal static void DisableStartMenuAds()
         {
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SystemPaneSuggestionsEnabled", "0", RegistryValueKind.DWord);
-
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-338393Enabled", "0", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-353694Enabled", "0", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-353696Enabled", "0", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-310093Enabled", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-338388Enabled", "0", RegistryValueKind.DWord);
-
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContentEnabled", "0", RegistryValueKind.DWord);
-
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SoftLandingEnabled", "0", RegistryValueKind.DWord);
-
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "FeatureManagementEnabled", "0", RegistryValueKind.DWord);
-
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer", "DisableSearchBoxSuggestions", 1, RegistryValueKind.DWord);
         }
 
         internal static void EnableStartMenuAds()
         {
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SystemPaneSuggestionsEnabled", "1", RegistryValueKind.DWord);
-
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-338393Enabled", "1", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-353694Enabled", "1", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-353696Enabled", "1", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-310093Enabled", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-338388Enabled", "1", RegistryValueKind.DWord);
-
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContentEnabled", "1", RegistryValueKind.DWord);
-
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SoftLandingEnabled", "1", RegistryValueKind.DWord);
-
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "FeatureManagementEnabled", "1", RegistryValueKind.DWord);
-
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer", "DisableSearchBoxSuggestions", 0, RegistryValueKind.DWord);
         }
 

+ 4 - 4
Optimizer/Options.cs

@@ -1,9 +1,9 @@
-using System;
-using System.Linq;
-using System.Windows.Forms;
+using Newtonsoft.Json;
+using System;
 using System.Drawing;
 using System.IO;
-using Newtonsoft.Json;
+using System.Linq;
+using System.Windows.Forms;
 
 namespace Optimizer
 {

+ 2 - 3
Optimizer/Program.cs

@@ -1,8 +1,7 @@
 using System;
-using System.Windows.Forms;
 using System.IO;
 using System.Reflection;
-using System.Threading;
+using System.Windows.Forms;
 
 namespace Optimizer
 {
@@ -14,7 +13,7 @@ namespace Optimizer
         // Enter current version here
 
         internal readonly static float Major = 7;
-        internal readonly static float Minor = 2;
+        internal readonly static float Minor = 3;
 
         internal readonly static bool EXPERIMENTAL_BUILD = false;
 

+ 3 - 3
Optimizer/SilentOps.cs

@@ -1,7 +1,7 @@
-using System.Threading.Tasks;
-using Newtonsoft.Json;
-using System.IO;
+using Newtonsoft.Json;
 using System;
+using System.IO;
+using System.Threading.Tasks;
 
 namespace Optimizer
 {

+ 33 - 8
Optimizer/Utilities.cs

@@ -1,17 +1,17 @@
 using Microsoft.Win32;
 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
+using System.Drawing;
+using System.IO;
 using System.Linq;
+using System.Management.Automation;
+using System.Net.NetworkInformation;
 using System.Reflection;
 using System.Security.Principal;
-using System.Windows.Forms;
-using System.IO;
-using System.Diagnostics;
 using System.ServiceProcess;
-using System.Management.Automation;
-using System.Drawing;
 using System.Threading.Tasks;
-using System.Net.NetworkInformation;
+using System.Windows.Forms;
 
 namespace Optimizer
 {
@@ -147,7 +147,7 @@ namespace Optimizer
 
             try
             {
-                current = Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\Main", "Default Download Directory", DefaultEdgeDownloadFolder).ToString();
+                current = Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge", "DownloadDirectory", DefaultEdgeDownloadFolder).ToString();
             }
             catch (Exception ex)
             {
@@ -160,7 +160,7 @@ namespace Optimizer
 
         internal static void SetEdgeDownloadFolder(string path)
         {
-            Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\Main", "Default Download Directory", path, RegistryValueKind.String);
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge", "DownloadDirectory", path, RegistryValueKind.String);
         }
 
         internal static void RunBatchFile(string batchFile)
@@ -621,5 +621,30 @@ namespace Optimizer
                 return null;
             }
         }
+
+        internal static bool IsInternetAvailable()
+        {
+            const int timeout = 1000;
+            const string host = "1.1.1.1";
+
+            var ping = new Ping();
+            var buffer = new byte[32];
+            var pingOptions = new PingOptions();
+
+            try
+            {
+                var reply = ping.Send(host, timeout, buffer, pingOptions);
+                return (reply != null && reply.Status == IPStatus.Success);
+            }
+            catch (Exception)
+            {
+                return false;
+            }
+        }
+
+        internal static void FlushDNSCache()
+        {
+            Utilities.RunCommand("ipconfig /release && ipconfig /flushdns && ipconfig /renew");
+        }
     }
 }

+ 3 - 3
README.md

@@ -54,6 +54,6 @@ https://github.com/hellzerg/optimizer/blob/master/LEGACY.md
 
 ## Details: ##
 
-* Latest version: 7.2
-* Released: April 10, 2021
-* SHA256: 114A58C173F3439E162309088703C69DEE65A974B181D372339BC7DC97231ACB
+* Latest version: 7.3
+* Released: April 11, 2021
+* SHA256: 2752EAE3280439EAE1E132AC67CE4BDA4D2896FBD523DECF79C58BFC364D4385

+ 1 - 1
version.txt

@@ -1 +1 @@
-7.2
+7.3