瀏覽代碼

Updated to 3.5

hellzerg 7 年之前
父節點
當前提交
c76b978347

+ 16 - 6
CHANGELOG.md

@@ -2,6 +2,16 @@
 
 
 All notable changes to this project will be documented in this file.
 All notable changes to this project will be documented in this file.
 
 
+## [3.5] - 2017-11-24
+- Added UWP app uninstaller
+- Disable Windows Defender also removes tray icon now
+- Disable Start Menu ads & Silent App Install improved
+- Added option to restore Taskbar color
+- Hide Sync Provider ads renamed to Disable Quick Access History
+   (disables used files and folders,
+    File Explorer opens 'This PC' by default now,
+	hides Sync Provider ads)
+
 ## [3.4] - 2017-10-25
 ## [3.4] - 2017-10-25
 - Performance improvements
 - Performance improvements
 - Startup crash on x86 systems fixed
 - Startup crash on x86 systems fixed
@@ -40,7 +50,7 @@ All notable changes to this project will be documented in this file.
 - Minor visual fixes
 - Minor visual fixes
 
 
 ## [2.5] - 2017-02-18
 ## [2.5] - 2017-02-18
-- Removed ability to uninstall Modern Apps on Windows 10 due to bugs
+- Removed ability to uninstall Modern Apps due to several bugs
 
 
 ## [2.4] - 2017-02-17
 ## [2.4] - 2017-02-17
 - Registry fixer improvements
 - Registry fixer improvements
@@ -61,19 +71,19 @@ All notable changes to this project will be documented in this file.
 - Cosmetic changes
 - Cosmetic changes
 
 
 ## [1.9] - 2016-11-14
 ## [1.9] - 2016-11-14
-- Further improved disable Office Telemetry option
+- Further improved Disable Office Telemetry
 
 
 ## [1.8] - 2016-10-27
 ## [1.8] - 2016-10-27
-- Bug fixes
+- More Bug fixes
 
 
 ## [1.7] - 2016-10-23
 ## [1.7] - 2016-10-23
-- Bug fixes
+- Minor Bug fixes
 
 
 ## [1.6] - 2016-10-20
 ## [1.6] - 2016-10-20
 - Added option to disable Game Bar on Windows 10
 - Added option to disable Game Bar on Windows 10
 
 
 ## [1.5] - 2016-09-14
 ## [1.5] - 2016-09-14
-- Bug fixes
+- Major Bug fixes
 
 
 ## [1.4] - 2016-09-12
 ## [1.4] - 2016-09-12
 - Added Hosts editor
 - Added Hosts editor
@@ -92,7 +102,7 @@ All notable changes to this project will be documented in this file.
 ## [1.1] - 2016-08-05
 ## [1.1] - 2016-08-05
 - Added option to enable/disable Print Service
 - Added option to enable/disable Print Service
 - Improved disable Office Telemetry option
 - Improved disable Office Telemetry option
-- Minor bug fixes
+- Major bug fixes
 
 
 ## [1.0] - 2016-07-26
 ## [1.0] - 2016-07-26
 - Initial release
 - Initial release

+ 1 - 1
Optimizer/EdgeForm.cs

@@ -38,7 +38,7 @@ namespace Optimizer
             }
             }
             else
             else
             {
             {
-                MessagerForm f = new MessagerForm(null, MessageType.Error, _errorMessage);
+                HelperForm f = new HelperForm(null, MessageType.Error, _errorMessage);
                 f.ShowDialog();
                 f.ShowDialog();
             }
             }
         }
         }

+ 18 - 16
Optimizer/MessagerForm.Designer.cs → Optimizer/HelperForm.Designer.cs

@@ -1,6 +1,6 @@
 namespace Optimizer
 namespace Optimizer
 {
 {
-    partial class MessagerForm
+    partial class HelperForm
     {
     {
         /// <summary>
         /// <summary>
         /// Required designer variable.
         /// Required designer variable.
@@ -38,10 +38,10 @@
             // lblMessage
             // lblMessage
             // 
             // 
             this.lblMessage.Font = new System.Drawing.Font("Segoe UI Semibold", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(161)));
             this.lblMessage.Font = new System.Drawing.Font("Segoe UI Semibold", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(161)));
-            this.lblMessage.Location = new System.Drawing.Point(12, 9);
+            this.lblMessage.Location = new System.Drawing.Point(10, 7);
             this.lblMessage.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.lblMessage.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.lblMessage.Name = "lblMessage";
             this.lblMessage.Name = "lblMessage";
-            this.lblMessage.Size = new System.Drawing.Size(540, 86);
+            this.lblMessage.Size = new System.Drawing.Size(432, 69);
             this.lblMessage.TabIndex = 0;
             this.lblMessage.TabIndex = 0;
             this.lblMessage.Text = "Restart to apply changes?";
             this.lblMessage.Text = "Restart to apply changes?";
             // 
             // 
@@ -55,10 +55,10 @@
             this.btnYes.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.btnYes.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.btnYes.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.btnYes.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.btnYes.ForeColor = System.Drawing.Color.White;
             this.btnYes.ForeColor = System.Drawing.Color.White;
-            this.btnYes.Location = new System.Drawing.Point(432, 160);
+            this.btnYes.Location = new System.Drawing.Point(358, 128);
             this.btnYes.Margin = new System.Windows.Forms.Padding(2);
             this.btnYes.Margin = new System.Windows.Forms.Padding(2);
             this.btnYes.Name = "btnYes";
             this.btnYes.Name = "btnYes";
-            this.btnYes.Size = new System.Drawing.Size(120, 39);
+            this.btnYes.Size = new System.Drawing.Size(96, 31);
             this.btnYes.TabIndex = 31;
             this.btnYes.TabIndex = 31;
             this.btnYes.Tag = "themeable";
             this.btnYes.Tag = "themeable";
             this.btnYes.Text = "Yes";
             this.btnYes.Text = "Yes";
@@ -75,10 +75,10 @@
             this.btnNo.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.btnNo.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.btnNo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.btnNo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.btnNo.ForeColor = System.Drawing.Color.White;
             this.btnNo.ForeColor = System.Drawing.Color.White;
-            this.btnNo.Location = new System.Drawing.Point(306, 160);
+            this.btnNo.Location = new System.Drawing.Point(257, 128);
             this.btnNo.Margin = new System.Windows.Forms.Padding(2);
             this.btnNo.Margin = new System.Windows.Forms.Padding(2);
             this.btnNo.Name = "btnNo";
             this.btnNo.Name = "btnNo";
-            this.btnNo.Size = new System.Drawing.Size(120, 39);
+            this.btnNo.Size = new System.Drawing.Size(96, 31);
             this.btnNo.TabIndex = 32;
             this.btnNo.TabIndex = 32;
             this.btnNo.Tag = "themeable";
             this.btnNo.Tag = "themeable";
             this.btnNo.Text = "No";
             this.btnNo.Text = "No";
@@ -92,10 +92,10 @@
             this.chkPrint.Checked = true;
             this.chkPrint.Checked = true;
             this.chkPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.chkPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.chkPrint.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(161)));
             this.chkPrint.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(161)));
-            this.chkPrint.Location = new System.Drawing.Point(12, 146);
+            this.chkPrint.Location = new System.Drawing.Point(10, 117);
             this.chkPrint.Margin = new System.Windows.Forms.Padding(2);
             this.chkPrint.Margin = new System.Windows.Forms.Padding(2);
             this.chkPrint.Name = "chkPrint";
             this.chkPrint.Name = "chkPrint";
-            this.chkPrint.Size = new System.Drawing.Size(271, 24);
+            this.chkPrint.Size = new System.Drawing.Size(211, 19);
             this.chkPrint.TabIndex = 33;
             this.chkPrint.TabIndex = 33;
             this.chkPrint.Text = "I use Print Service, do not disable it";
             this.chkPrint.Text = "I use Print Service, do not disable it";
             this.chkPrint.UseVisualStyleBackColor = true;
             this.chkPrint.UseVisualStyleBackColor = true;
@@ -105,24 +105,26 @@
             // 
             // 
             this.chkSensors.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
             this.chkSensors.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
             this.chkSensors.AutoSize = true;
             this.chkSensors.AutoSize = true;
+            this.chkSensors.Checked = true;
+            this.chkSensors.CheckState = System.Windows.Forms.CheckState.Checked;
             this.chkSensors.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(161)));
             this.chkSensors.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(161)));
-            this.chkSensors.Location = new System.Drawing.Point(12, 175);
+            this.chkSensors.Location = new System.Drawing.Point(10, 140);
             this.chkSensors.Margin = new System.Windows.Forms.Padding(2);
             this.chkSensors.Margin = new System.Windows.Forms.Padding(2);
             this.chkSensors.Name = "chkSensors";
             this.chkSensors.Name = "chkSensors";
-            this.chkSensors.Size = new System.Drawing.Size(288, 24);
+            this.chkSensors.Size = new System.Drawing.Size(226, 19);
             this.chkSensors.TabIndex = 34;
             this.chkSensors.TabIndex = 34;
             this.chkSensors.Text = "This is a tablet, do not disable Sensors";
             this.chkSensors.Text = "This is a tablet, do not disable Sensors";
             this.chkSensors.UseVisualStyleBackColor = true;
             this.chkSensors.UseVisualStyleBackColor = true;
             this.chkSensors.Visible = false;
             this.chkSensors.Visible = false;
             // 
             // 
-            // MessagerForm
+            // HelperForm
             // 
             // 
             this.AcceptButton = this.btnYes;
             this.AcceptButton = this.btnYes;
-            this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
             this.CancelButton = this.btnNo;
             this.CancelButton = this.btnNo;
-            this.ClientSize = new System.Drawing.Size(564, 211);
+            this.ClientSize = new System.Drawing.Size(463, 169);
             this.Controls.Add(this.chkSensors);
             this.Controls.Add(this.chkSensors);
             this.Controls.Add(this.chkPrint);
             this.Controls.Add(this.chkPrint);
             this.Controls.Add(this.btnNo);
             this.Controls.Add(this.btnNo);
@@ -131,10 +133,10 @@
             this.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(161)));
             this.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(161)));
             this.ForeColor = System.Drawing.Color.White;
             this.ForeColor = System.Drawing.Color.White;
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
-            this.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
+            this.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.MaximizeBox = false;
             this.MaximizeBox = false;
             this.MinimizeBox = false;
             this.MinimizeBox = false;
-            this.Name = "MessagerForm";
+            this.Name = "HelperForm";
             this.ShowIcon = false;
             this.ShowIcon = false;
             this.ShowInTaskbar = false;
             this.ShowInTaskbar = false;
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;

+ 3 - 3
Optimizer/MessagerForm.cs → Optimizer/HelperForm.cs

@@ -10,7 +10,7 @@ using System.Windows.Forms;
 
 
 namespace Optimizer
 namespace Optimizer
 {
 {
-    public partial class MessagerForm : System.Windows.Forms.Form
+    public partial class HelperForm : System.Windows.Forms.Form
     {
     {
         MainForm _main;
         MainForm _main;
         MessageType _type;
         MessageType _type;
@@ -46,7 +46,7 @@ namespace Optimizer
             }
             }
         }
         }
 
 
-        internal MessagerForm(MainForm main, MessageType m, string text)
+        internal HelperForm(MainForm main, MessageType m, string text)
         {
         {
             InitializeComponent();
             InitializeComponent();
             Options.ApplyTheme(this);
             Options.ApplyTheme(this);
@@ -70,7 +70,7 @@ namespace Optimizer
             {
             {
                 chkPrint.Checked = true;
                 chkPrint.Checked = true;
                 chkPrint.Visible = true;
                 chkPrint.Visible = true;
-                chkSensors.Checked = false;
+                chkSensors.Checked = true;
                 chkSensors.Visible = true;
                 chkSensors.Visible = true;
             }
             }
         }
         }

+ 0 - 0
Optimizer/MessagerForm.resx → Optimizer/HelperForm.resx


文件差異過大導致無法顯示
+ 258 - 124
Optimizer/MainForm.Designer.cs


+ 106 - 14
Optimizer/MainForm.cs

@@ -27,6 +27,7 @@ namespace Optimizer
         List<string> _hostsEntries = new List<string>();
         List<string> _hostsEntries = new List<string>();
         List<string> _customCommands = new List<string>();
         List<string> _customCommands = new List<string>();
         List<string> _desktopItems = new List<string>();
         List<string> _desktopItems = new List<string>();
+        List<string> _modernApps = new List<string>();
 
 
         DesktopItemType _desktopItemType = DesktopItemType.Program;
         DesktopItemType _desktopItemType = DesktopItemType.Program;
         DesktopTypePosition _desktopItemPosition = DesktopTypePosition.Top;
         DesktopTypePosition _desktopItemPosition = DesktopTypePosition.Top;
@@ -37,6 +38,11 @@ namespace Optimizer
         readonly string _removeStartupItemsMessage = "Are you sure you want to delete all startup items?";
         readonly string _removeStartupItemsMessage = "Are you sure you want to delete all startup items?";
         readonly string _removeHostsEntriesMessage = "Are you sure you want to delete all hosts entries?";
         readonly string _removeHostsEntriesMessage = "Are you sure you want to delete all hosts entries?";
         readonly string _removeDesktopItemsMessage = "Are you sure you want to delete all desktop items?";
         readonly string _removeDesktopItemsMessage = "Are you sure you want to delete all desktop items?";
+        readonly string _removeModernAppsMessage = "Are you sure you want to uninstall the following app(s)?";
+        readonly string _errorModernAppsMessage = "The following app(s) couldn't be uninstalled:\n";
+        readonly string _applyAllWindows7Message = "This will apply every option in Universal and Windows 7 tabs. Continue?";
+        readonly string _applyAllWindows8Message = "This will apply every option in Universal and Windows 8.1 tabs. Continue?";
+        readonly string _applyAllWindows10Message = "This will apply every option in Universal and Windows 10 tabs. Continue?";
 
 
         private void LoadSettings()
         private void LoadSettings()
         {
         {
@@ -80,18 +86,18 @@ namespace Optimizer
 
 
                 if (Utilities.CurrentWindowsVersion == WindowsVersion.Windows7)
                 if (Utilities.CurrentWindowsVersion == WindowsVersion.Windows7)
                 {
                 {
-                    message = "This will apply every option in Universal and Windows 7 tab. Continue?";
+                    message = _applyAllWindows7Message;
                 }
                 }
                 if (Utilities.CurrentWindowsVersion == WindowsVersion.Windows8)
                 if (Utilities.CurrentWindowsVersion == WindowsVersion.Windows8)
                 {
                 {
-                    message = "This will apply every option in Universal and Windows 8.1 tab. Continue?";
+                    message = _applyAllWindows8Message;
                 }
                 }
                 if (Utilities.CurrentWindowsVersion == WindowsVersion.Windows10)
                 if (Utilities.CurrentWindowsVersion == WindowsVersion.Windows10)
                 {
                 {
-                    message = "This will apply every option in Universal and Windows 10 tab. Continue?";
+                    message = _applyAllWindows10Message;
                 }
                 }
 
 
-                MessagerForm r = new MessagerForm(this, MessageType.Optimize, message);
+                HelperForm r = new HelperForm(this, MessageType.Optimize, message);
                 r.ShowDialog(this);
                 r.ShowDialog(this);
             }
             }
         }
         }
@@ -232,6 +238,7 @@ namespace Optimizer
             GetHostsEntries();
             GetHostsEntries();
             GetDesktopItems();
             GetDesktopItems();
             GetCustomCommands();
             GetCustomCommands();
+            GetModernApps();
 
 
             LoadSettings();
             LoadSettings();
 
 
@@ -250,12 +257,14 @@ namespace Optimizer
                 tabCollection.TabPages.Remove(windowsVIITab);
                 tabCollection.TabPages.Remove(windowsVIITab);
                 tabCollection.TabPages.Remove(windowsVIIITab);
                 tabCollection.TabPages.Remove(windowsVIIITab);
                 tabCollection.TabPages.Remove(windowsXTab);
                 tabCollection.TabPages.Remove(windowsXTab);
+                tabCollection.TabPages.Remove(modernAppsTab);
             }   
             }   
 
 
             if (Utilities.CurrentWindowsVersion == WindowsVersion.Windows7)
             if (Utilities.CurrentWindowsVersion == WindowsVersion.Windows7)
             {
             {
                 tabCollection.TabPages.Remove(windowsVIIITab);
                 tabCollection.TabPages.Remove(windowsVIIITab);
                 tabCollection.TabPages.Remove(windowsXTab);
                 tabCollection.TabPages.Remove(windowsXTab);
+                tabCollection.TabPages.Remove(modernAppsTab);
             }
             }
 
 
             if (Utilities.CurrentWindowsVersion == WindowsVersion.Windows8)
             if (Utilities.CurrentWindowsVersion == WindowsVersion.Windows8)
@@ -314,6 +323,72 @@ namespace Optimizer
             }
             }
         }
         }
 
 
+        private void GetModernApps()
+        {
+            button74.Enabled = false;
+            button75.Enabled = false;
+            listModernApps.Enabled = false;
+
+            listModernApps.Items.Clear();
+            _modernApps = Utilities.GetModernApps();
+
+            foreach (string x in _modernApps)
+            {
+                listModernApps.Items.Add(x);
+            }
+
+            button74.Enabled = true;
+            button75.Enabled = true;
+            listModernApps.Enabled = true;
+        }
+
+        private async void UninstallModernApps()
+        {
+            string selectedApps = string.Empty;
+
+            if (listModernApps.CheckedItems.Count > 0)
+            {
+                foreach (string x in listModernApps.CheckedItems)
+                {
+                    if (string.IsNullOrEmpty(selectedApps))
+                    {
+                        selectedApps = x;
+                    }
+                    else
+                    {
+                        selectedApps += Environment.NewLine + x;
+                    }
+                }
+
+                if (MessageBox.Show(_removeModernAppsMessage + "\n\n" + selectedApps, "Optimizer", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
+                {
+                    button74.Enabled = false;
+                    button75.Enabled = false;
+                    listModernApps.Enabled = false;
+
+                    bool errorOccured = false;
+                    string failedApps = string.Empty;
+
+                    foreach (string app in listModernApps.CheckedItems)
+                    {
+                        await Task.Run(() => errorOccured = Utilities.UninstallModernApp(app));
+
+                        if (errorOccured)
+                        {
+                            failedApps += Environment.NewLine + app;
+                        }
+                    }
+
+                    if (!string.IsNullOrEmpty(failedApps))
+                    {
+                        MessageBox.Show(_errorModernAppsMessage + failedApps, "Optimizer", MessageBoxButtons.OK, MessageBoxIcon.Information);
+                    }
+
+                    GetModernApps();
+                }
+            }
+        }
+
         private void GetCustomCommands()
         private void GetCustomCommands()
         {
         {
             _customCommands = Integrator.GetCustomCommands();
             _customCommands = Integrator.GetCustomCommands();
@@ -332,25 +407,25 @@ namespace Optimizer
 
 
         private void button39_Click(object sender, EventArgs e)
         private void button39_Click(object sender, EventArgs e)
         {
         {
-            MessagerForm f = new MessagerForm(this, MessageType.Restart, _restartMessage);
+            HelperForm f = new HelperForm(this, MessageType.Restart, _restartMessage);
             f.ShowDialog();
             f.ShowDialog();
         }
         }
 
 
         private void button43_Click(object sender, EventArgs e)
         private void button43_Click(object sender, EventArgs e)
         {
         {
-            MessagerForm f = new MessagerForm(this, MessageType.Restart, _restartMessage);
+            HelperForm f = new HelperForm(this, MessageType.Restart, _restartMessage);
             f.ShowDialog();
             f.ShowDialog();
         }
         }
 
 
         private void button44_Click(object sender, EventArgs e)
         private void button44_Click(object sender, EventArgs e)
         {
         {
-            MessagerForm f = new MessagerForm(this, MessageType.Restart, _restartMessage);
+            HelperForm f = new HelperForm(this, MessageType.Restart, _restartMessage);
             f.ShowDialog();
             f.ShowDialog();
         }
         }
 
 
         private void button45_Click(object sender, EventArgs e)
         private void button45_Click(object sender, EventArgs e)
         {
         {
-            MessagerForm f = new MessagerForm(this, MessageType.Restart, _restartMessage);
+            HelperForm f = new HelperForm(this, MessageType.Restart, _restartMessage);
             f.ShowDialog();
             f.ShowDialog();
         }
         }
 
 
@@ -570,7 +645,7 @@ namespace Optimizer
         {
         {
             if (listStartupItems.Items.Count > 0)
             if (listStartupItems.Items.Count > 0)
             {
             {
-                MessagerForm r = new MessagerForm(this, MessageType.Startup, _removeStartupItemsMessage);
+                HelperForm r = new HelperForm(this, MessageType.Startup, _removeStartupItemsMessage);
                 r.ShowDialog(this);
                 r.ShowDialog(this);
             } 
             } 
         }
         }
@@ -598,11 +673,12 @@ namespace Optimizer
         private void button33_Click(object sender, EventArgs e)
         private void button33_Click(object sender, EventArgs e)
         {
         {
             bool flag = FixRegistry();
             bool flag = FixRegistry();
-            panel2.Enabled = false;
-            button33.Enabled = false;
 
 
             if (flag)
             if (flag)
             {
             {
+                panel2.Enabled = false;
+                button33.Enabled = false;
+
                 if (checkRestartExplorer.Checked)
                 if (checkRestartExplorer.Checked)
                 {
                 {
                     Utilities.RestartExplorer();
                     Utilities.RestartExplorer();
@@ -699,7 +775,7 @@ namespace Optimizer
         {
         {
             if (listHostEntries.Items.Count > 0)
             if (listHostEntries.Items.Count > 0)
             {
             {
-                MessagerForm r = new MessagerForm(this, MessageType.Hosts, _removeHostsEntriesMessage);
+                HelperForm r = new HelperForm(this, MessageType.Hosts, _removeHostsEntriesMessage);
                 r.ShowDialog(this);
                 r.ShowDialog(this);
             }
             }
         }
         }
@@ -840,7 +916,7 @@ namespace Optimizer
         {
         {
             if (listDesktopItems.Items.Count > 0)
             if (listDesktopItems.Items.Count > 0)
             {
             {
-                MessagerForm r = new MessagerForm(this, MessageType.Integrator, _removeDesktopItemsMessage);
+                HelperForm r = new HelperForm(this, MessageType.Integrator, _removeDesktopItemsMessage);
                 r.ShowDialog(this);
                 r.ShowDialog(this);
             }
             }
         }
         }
@@ -1289,7 +1365,7 @@ namespace Optimizer
 
 
         private void button7_Click(object sender, EventArgs e)
         private void button7_Click(object sender, EventArgs e)
         {
         {
-            Optimize.DisableSyncProviderNotifications();
+            Optimize.DisableQuickAccess();
             button7.Enabled = false;
             button7.Enabled = false;
         }
         }
 
 
@@ -1348,5 +1424,21 @@ namespace Optimizer
             Optimize.DisableSpellingAndTypingFeatures();
             Optimize.DisableSpellingAndTypingFeatures();
             button72.Enabled = false;
             button72.Enabled = false;
         }
         }
+
+        private void button73_Click(object sender, EventArgs e)
+        {
+            Optimize.RestoreTaskbarColor();
+            button73.Enabled = false;
+        }
+
+        private void button75_Click(object sender, EventArgs e)
+        {
+            GetModernApps();
+        }
+
+        private void button74_Click(object sender, EventArgs e)
+        {
+            UninstallModernApps();
+        }
     }
     }
 }
 }

+ 9 - 0
Optimizer/MainForm.resx

@@ -138,6 +138,15 @@
         7zVHyOzQcL8zr8oq0JC/Mq/IatCwr82jsio09It5RFbH4ct/S5CfRERERERERERERERE5CZvb38B7qmZ
         7zVHyOzQcL8zr8oq0JC/Mq/IatCwr82jsio09It5RFbH4ct/S5CfRERERERERERERERE5CZvb38B7qmZ
         VUrZey8AAAAASUVORK5CYII=
         VUrZey8AAAAASUVORK5CYII=
 </value>
 </value>
+  </data>
+  <data name="label19.Text" xml:space="preserve">
+    <value>Items can have custom icons and position.
+They can also be hidden, accessible only
+by pressing the SHIFT key.
+
+Also, it can create custom commands
+for Run Dialog, making it easy to launch
+any application only by typing your desired keyword.</value>
   </data>
   </data>
   <metadata name="defineCommandDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
   <metadata name="defineCommandDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
     <value>17, 17</value>

+ 40 - 1
Optimizer/Optimize.cs

@@ -146,6 +146,16 @@ namespace Optimizer
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Spynet", "SubmitSamplesConsent", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Spynet", "SubmitSamplesConsent", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\MRT", "DontReportInfectionInformation", "1", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\MRT", "DontReportInfectionInformation", "1", RegistryValueKind.DWord);
             Registry.ClassesRoot.DeleteSubKeyTree(@"\CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}", false);
             Registry.ClassesRoot.DeleteSubKeyTree(@"\CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}", false);
+
+            RegistryKey k = RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, RegistryView.Registry64);
+
+            using (RegistryKey tmp = k.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true))
+            {
+                tmp.DeleteValue("WindowsDefender", false);
+                tmp.DeleteValue("SecurityHealth", false);
+            }
+
+            Utilities.RunCommand("regsvr32 /u /s \"C:\\Program Files\\Windows Defender\\shellext.dll\"");
         }
         }
 
 
         internal static void DisableErrorReporting()
         internal static void DisableErrorReporting()
@@ -167,7 +177,10 @@ namespace Optimizer
         internal static void RestoreLegacyVolumeSlider()
         internal static void RestoreLegacyVolumeSlider()
         {
         {
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\MTCUVC", "EnableMtcUvc", "00000000", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\MTCUVC", "EnableMtcUvc", "00000000", RegistryValueKind.DWord);
+        }
 
 
+        internal static void RestoreTaskbarColor()
+        {
             // enable title bar color
             // enable title bar color
             Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM", "ColorPrevalence", "00000001", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM", "ColorPrevalence", "00000001", RegistryValueKind.DWord);
 
 
@@ -372,19 +385,45 @@ namespace Optimizer
             Registry.SetValue(@"HKEY_CURRENT_USER\System\GameConfigStore", "GameDVR_Enabled", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\System\GameConfigStore", "GameDVR_Enabled", "0", RegistryValueKind.DWord);
         }
         }
 
 
-        internal static void DisableSyncProviderNotifications()
+        internal static void DisableQuickAccess()
         {
         {
+            // Hide Sync Provider ads
             Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowSyncProviderNotifications", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowSyncProviderNotifications", "0", RegistryValueKind.DWord);
+
+            // Disable Quick Access history
+            using (RegistryKey k = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer", true))
+            {
+                k.SetValue("ShowFrequent", 0, RegistryValueKind.DWord);
+                k.SetValue("ShowRecent", 0, RegistryValueKind.DWord);
+            }
+
+            // File Explorer opens 'This PC' by default
+            using (RegistryKey k = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", true))
+            {
+                k.SetValue("LaunchTo", 1, RegistryValueKind.DWord);
+            }
         }
         }
 
 
         internal static void DisableStartMenuAds()
         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", "SystemPaneSuggestionsEnabled", "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);
         }
         }
 
 
         internal static void DisableSilentAppInstall()
         internal static void DisableSilentAppInstall()
         {
         {
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SilentInstalledAppsEnabled", "0", RegistryValueKind.DWord);
             Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SilentInstalledAppsEnabled", "0", RegistryValueKind.DWord);
+
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "PreInstalledAppsEnabled", "0", RegistryValueKind.DWord);
+
+            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "OemPreInstalledAppsEnabled", "0", RegistryValueKind.DWord);
         }
         }
 
 
         internal static void DisableMyPeople()
         internal static void DisableMyPeople()

+ 2 - 1
Optimizer/OptimizeForm.cs

@@ -90,13 +90,14 @@ namespace Optimizer
                         Optimize.UninstallOneDrive();
                         Optimize.UninstallOneDrive();
                         Optimize.DisablePrivacyOptions();
                         Optimize.DisablePrivacyOptions();
                         Optimize.DisableGameBar();
                         Optimize.DisableGameBar();
-                        Optimize.DisableSyncProviderNotifications();
+                        Optimize.DisableQuickAccess();
                         Optimize.DisableStartMenuAds();
                         Optimize.DisableStartMenuAds();
                         Optimize.DisableSilentAppInstall();
                         Optimize.DisableSilentAppInstall();
                         Optimize.DisableMyPeople();
                         Optimize.DisableMyPeople();
                         Optimize.ExcludeDrivers();
                         Optimize.ExcludeDrivers();
                         Optimize.DisableWindowsInk();
                         Optimize.DisableWindowsInk();
                         Optimize.DisableSpellingAndTypingFeatures();
                         Optimize.DisableSpellingAndTypingFeatures();
+                        Optimize.RestoreTaskbarColor();
                     }
                     }
                 }
                 }
                 catch //(Exception error)
                 catch //(Exception error)

+ 5 - 5
Optimizer/Optimizer.csproj

@@ -123,11 +123,11 @@
     <Compile Include="Options.cs" />
     <Compile Include="Options.cs" />
     <Compile Include="Program.cs" />
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="MessagerForm.cs">
+    <Compile Include="HelperForm.cs">
       <SubType>Form</SubType>
       <SubType>Form</SubType>
     </Compile>
     </Compile>
-    <Compile Include="MessagerForm.Designer.cs">
-      <DependentUpon>MessagerForm.cs</DependentUpon>
+    <Compile Include="HelperForm.Designer.cs">
+      <DependentUpon>HelperForm.cs</DependentUpon>
     </Compile>
     </Compile>
     <Compile Include="Required.cs" />
     <Compile Include="Required.cs" />
     <Compile Include="StartupItem.cs" />
     <Compile Include="StartupItem.cs" />
@@ -160,8 +160,8 @@
       <DependentUpon>Resources.resx</DependentUpon>
       <DependentUpon>Resources.resx</DependentUpon>
       <DesignTime>True</DesignTime>
       <DesignTime>True</DesignTime>
     </Compile>
     </Compile>
-    <EmbeddedResource Include="MessagerForm.resx">
-      <DependentUpon>MessagerForm.cs</DependentUpon>
+    <EmbeddedResource Include="HelperForm.resx">
+      <DependentUpon>HelperForm.cs</DependentUpon>
     </EmbeddedResource>
     </EmbeddedResource>
     <None Include="app.manifest">
     <None Include="app.manifest">
       <SubType>Designer</SubType>
       <SubType>Designer</SubType>

+ 3 - 3
Optimizer/Program.cs

@@ -18,7 +18,7 @@ namespace Optimizer
 
 
         // Enter current version here
         // Enter current version here
         internal readonly static float Major = 3;
         internal readonly static float Major = 3;
-        internal readonly static float Minor = 4;
+        internal readonly static float Minor = 5;
 
 
         internal static string GetCurrentVersion()
         internal static string GetCurrentVersion()
         {
         {
@@ -40,7 +40,7 @@ namespace Optimizer
 
 
             if (!Utilities.IsAdmin())
             if (!Utilities.IsAdmin())
             {
             {
-                MessagerForm f = new MessagerForm(null, MessageType.Error, _adminMissingMessage);
+                HelperForm f = new HelperForm(null, MessageType.Error, _adminMissingMessage);
                 f.ShowDialog();
                 f.ShowDialog();
 
 
                 Application.Exit();
                 Application.Exit();
@@ -74,7 +74,7 @@ namespace Optimizer
                 }
                 }
                 else
                 else
                 {
                 {
-                    MessagerForm f = new MessagerForm(null, MessageType.Error, _unsupportedMessage);
+                    HelperForm f = new HelperForm(null, MessageType.Error, _unsupportedMessage);
                     f.ShowDialog();
                     f.ShowDialog();
 
 
                     Application.Exit();
                     Application.Exit();

文件差異過大導致無法顯示
+ 0 - 482
Optimizer/Utilities.cs


+ 3 - 2
README.md

@@ -14,6 +14,7 @@ Depending on your version of Windows, Optimizer will also allow you to perform s
 * Disable Office telemetry (works only with 2016)
 * Disable Office telemetry (works only with 2016)
 * Disable Cortana
 * Disable Cortana
 * Disable Windows 10 automatic updates
 * Disable Windows 10 automatic updates
+* Uninstall UWP apps
 * Block Skype ads
 * Block Skype ads
 * Clean up your system drive
 * Clean up your system drive
 * Fix common registry issues 
 * Fix common registry issues 
@@ -33,5 +34,5 @@ https://github.com/hellzerg/optimizer/releases
 
 
 ## Details: ##
 ## Details: ##
 
 
-* Latest version: 3.4
-* Released: October 25, 2017
+* Latest version: 3.5
+* Released: November 24, 2017

部分文件因文件數量過多而無法顯示