Bläddra i källkod

Updated to 4.1

deadmoon 7 år sedan
förälder
incheckning
f2a2663170
8 ändrade filer med 93 tillägg och 38 borttagningar
  1. 3 0
      CHANGELOG.md
  2. 51 34
      Optimizer/MainForm.Designer.cs
  3. 15 0
      Optimizer/MainForm.cs
  4. 18 0
      Optimizer/Optimize.cs
  5. 2 0
      Optimizer/Options.cs
  6. 1 1
      Optimizer/Program.cs
  7. 2 2
      README.md
  8. 1 1
      version.txt

+ 3 - 0
CHANGELOG.md

@@ -2,6 +2,9 @@
 
 All notable changes to this project will be documented in this file.
 
+## [4.1] - 2018-03-09
+- Added: Disable forced feature updates on Windows 10
+
 ## [4.0] - 2018-02-21
 - Added: Disable Fax service
 - Added: Disable Windows Insider service

+ 51 - 34
Optimizer/MainForm.Designer.cs

@@ -39,6 +39,7 @@
             this.bpanel = new System.Windows.Forms.Panel();
             this.tabCollection = new System.Windows.Forms.TabControl();
             this.universalTab = new System.Windows.Forms.TabPage();
+            this.toggleSwitch33 = new Optimizer.ToggleSwitch();
             this.toggleSwitch32 = new Optimizer.ToggleSwitch();
             this.toggleSwitch12 = new Optimizer.ToggleSwitch();
             this.toggleSwitch11 = new Optimizer.ToggleSwitch();
@@ -54,6 +55,8 @@
             this.toggleSwitch2 = new Optimizer.ToggleSwitch();
             this.button39 = new System.Windows.Forms.Button();
             this.windowsXTab = new System.Windows.Forms.TabPage();
+            this.toggleSwitch35 = new Optimizer.ToggleSwitch();
+            this.toggleSwitch34 = new Optimizer.ToggleSwitch();
             this.toggleSwitch27 = new Optimizer.ToggleSwitch();
             this.toggleSwitch28 = new Optimizer.ToggleSwitch();
             this.toggleSwitch29 = new Optimizer.ToggleSwitch();
@@ -238,8 +241,6 @@
             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.toggleSwitch33 = new Optimizer.ToggleSwitch();
-            this.toggleSwitch34 = new Optimizer.ToggleSwitch();
             this.tpanel.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             this.bpanel.SuspendLayout();
@@ -408,6 +409,20 @@
             this.universalTab.TabIndex = 0;
             this.universalTab.Text = "Universal";
             // 
+            // toggleSwitch33
+            // 
+            this.toggleSwitch33.Location = new System.Drawing.Point(549, 65);
+            this.toggleSwitch33.Margin = new System.Windows.Forms.Padding(2);
+            this.toggleSwitch33.Name = "toggleSwitch33";
+            this.toggleSwitch33.OffFont = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.toggleSwitch33.OffForeColor = System.Drawing.Color.White;
+            this.toggleSwitch33.OnFont = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.toggleSwitch33.OnForeColor = System.Drawing.Color.White;
+            this.toggleSwitch33.OnText = "Disable Fax Service";
+            this.toggleSwitch33.Size = new System.Drawing.Size(260, 39);
+            this.toggleSwitch33.TabIndex = 48;
+            this.toggleSwitch33.Tag = "themeable";
+            // 
             // toggleSwitch32
             // 
             this.toggleSwitch32.Location = new System.Drawing.Point(549, 20);
@@ -610,6 +625,7 @@
             // windowsXTab
             // 
             this.windowsXTab.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
+            this.windowsXTab.Controls.Add(this.toggleSwitch35);
             this.windowsXTab.Controls.Add(this.toggleSwitch34);
             this.windowsXTab.Controls.Add(this.toggleSwitch27);
             this.windowsXTab.Controls.Add(this.toggleSwitch28);
@@ -639,6 +655,34 @@
             this.windowsXTab.TabIndex = 1;
             this.windowsXTab.Text = "Windows 10";
             // 
+            // toggleSwitch35
+            // 
+            this.toggleSwitch35.Location = new System.Drawing.Point(550, 245);
+            this.toggleSwitch35.Margin = new System.Windows.Forms.Padding(2);
+            this.toggleSwitch35.Name = "toggleSwitch35";
+            this.toggleSwitch35.OffFont = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.toggleSwitch35.OffForeColor = System.Drawing.Color.White;
+            this.toggleSwitch35.OnFont = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.toggleSwitch35.OnForeColor = System.Drawing.Color.White;
+            this.toggleSwitch35.OnText = "Disable Feature Updates";
+            this.toggleSwitch35.Size = new System.Drawing.Size(260, 39);
+            this.toggleSwitch35.TabIndex = 58;
+            this.toggleSwitch35.Tag = "themeable";
+            // 
+            // toggleSwitch34
+            // 
+            this.toggleSwitch34.Location = new System.Drawing.Point(550, 200);
+            this.toggleSwitch34.Margin = new System.Windows.Forms.Padding(2);
+            this.toggleSwitch34.Name = "toggleSwitch34";
+            this.toggleSwitch34.OffFont = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.toggleSwitch34.OffForeColor = System.Drawing.Color.White;
+            this.toggleSwitch34.OnFont = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.toggleSwitch34.OnForeColor = System.Drawing.Color.White;
+            this.toggleSwitch34.OnText = "Disable Insider Service";
+            this.toggleSwitch34.Size = new System.Drawing.Size(260, 39);
+            this.toggleSwitch34.TabIndex = 57;
+            this.toggleSwitch34.Tag = "themeable";
+            // 
             // toggleSwitch27
             // 
             this.toggleSwitch27.Location = new System.Drawing.Point(18, 200);
@@ -2135,7 +2179,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(850, 606);
+            this.tabPage8.Size = new System.Drawing.Size(850, 607);
             this.tabPage8.TabIndex = 1;
             this.tabPage8.Text = "Add/Modify";
             // 
@@ -2482,7 +2526,7 @@
             this.tabPage9.Margin = new System.Windows.Forms.Padding(2);
             this.tabPage9.Name = "tabPage9";
             this.tabPage9.Padding = new System.Windows.Forms.Padding(2);
-            this.tabPage9.Size = new System.Drawing.Size(850, 606);
+            this.tabPage9.Size = new System.Drawing.Size(850, 607);
             this.tabPage9.TabIndex = 2;
             this.tabPage9.Text = "Remove";
             // 
@@ -2596,7 +2640,7 @@
             this.tabPage10.Margin = new System.Windows.Forms.Padding(2);
             this.tabPage10.Name = "tabPage10";
             this.tabPage10.Padding = new System.Windows.Forms.Padding(2);
-            this.tabPage10.Size = new System.Drawing.Size(850, 606);
+            this.tabPage10.Size = new System.Drawing.Size(850, 607);
             this.tabPage10.TabIndex = 3;
             this.tabPage10.Text = "Ready Menus";
             // 
@@ -2840,7 +2884,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(850, 606);
+            this.tabPage11.Size = new System.Drawing.Size(850, 607);
             this.tabPage11.TabIndex = 4;
             this.tabPage11.Text = "Run Dialog";
             // 
@@ -3246,34 +3290,6 @@
             this.runDialogTime.Interval = 5;
             this.runDialogTime.Tick += new System.EventHandler(this.runDialogTimer_Tick);
             // 
-            // toggleSwitch33
-            // 
-            this.toggleSwitch33.Location = new System.Drawing.Point(549, 65);
-            this.toggleSwitch33.Margin = new System.Windows.Forms.Padding(2);
-            this.toggleSwitch33.Name = "toggleSwitch33";
-            this.toggleSwitch33.OffFont = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.toggleSwitch33.OffForeColor = System.Drawing.Color.White;
-            this.toggleSwitch33.OnFont = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.toggleSwitch33.OnForeColor = System.Drawing.Color.White;
-            this.toggleSwitch33.OnText = "Disable Fax Service";
-            this.toggleSwitch33.Size = new System.Drawing.Size(260, 39);
-            this.toggleSwitch33.TabIndex = 48;
-            this.toggleSwitch33.Tag = "themeable";
-            // 
-            // toggleSwitch34
-            // 
-            this.toggleSwitch34.Location = new System.Drawing.Point(550, 200);
-            this.toggleSwitch34.Margin = new System.Windows.Forms.Padding(2);
-            this.toggleSwitch34.Name = "toggleSwitch34";
-            this.toggleSwitch34.OffFont = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.toggleSwitch34.OffForeColor = System.Drawing.Color.White;
-            this.toggleSwitch34.OnFont = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.toggleSwitch34.OnForeColor = System.Drawing.Color.White;
-            this.toggleSwitch34.OnText = "Disable Insider Service";
-            this.toggleSwitch34.Size = new System.Drawing.Size(260, 39);
-            this.toggleSwitch34.TabIndex = 57;
-            this.toggleSwitch34.Tag = "themeable";
-            // 
             // MainForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F);
@@ -3565,6 +3581,7 @@
         private System.Windows.Forms.Button btnChangelog;
         private ToggleSwitch toggleSwitch33;
         private ToggleSwitch toggleSwitch34;
+        private ToggleSwitch toggleSwitch35;
     }
 }
 

+ 15 - 0
Optimizer/MainForm.cs

@@ -131,6 +131,20 @@ namespace Optimizer
             toggleSwitch32.Click += new EventHandler(toggleSwitch32_Click);
             toggleSwitch33.Click += new EventHandler(ToggleSwitch33_Click);
             toggleSwitch34.Click += new EventHandler(ToggleSwitch34_Click);
+            toggleSwitch35.Click += new EventHandler(ToggleSwitch35_Click);
+        }
+
+        private void ToggleSwitch35_Click(object sender, EventArgs e)
+        {
+            if (!toggleSwitch35.Checked)
+            {
+                Optimize.DisableForcedFeatureUpdates();
+            }
+            else
+            {
+                Optimize.EnableForcedFeatureUpdates();
+            }
+            Options.CurrentOptions.DisableFeatureUpdates = !toggleSwitch35.Checked;
         }
 
         private void ToggleSwitch34_Click(object sender, EventArgs e)
@@ -416,6 +430,7 @@ namespace Optimizer
             toggleSwitch29.Checked = Options.CurrentOptions.DisableWindowsInk;
             toggleSwitch30.Checked = Options.CurrentOptions.ExcludeDrivers;
             toggleSwitch34.Checked = Options.CurrentOptions.DisableInsiderService;
+            toggleSwitch35.Checked = Options.CurrentOptions.DisableFeatureUpdates;
         }
 
         private void Main_Load(object sender, EventArgs e)

+ 18 - 0
Optimizer/Optimize.cs

@@ -892,5 +892,23 @@ namespace Optimizer
             Utilities.StopService("wisvc");
             Registry.SetValue("HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\wisvc", "Start", "4", RegistryValueKind.DWord);
         }
+
+        internal static void DisableForcedFeatureUpdates()
+        {
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate", "DisableOSUpgrade", "1", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade", "AllowOSUpgrade", "0", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade", "ReservationsAllowed", "0", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore", "DisableOSUpgrade", "1", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\Setup\UpgradeNotification", "UpgradeAvailable", "0", RegistryValueKind.DWord);
+        }
+
+        internal static void EnableForcedFeatureUpdates()
+        {
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate", "DisableOSUpgrade", "0", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade", "AllowOSUpgrade", "1", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade", "ReservationsAllowed", "1", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsStore", "DisableOSUpgrade", "0", RegistryValueKind.DWord);
+            Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\Setup\UpgradeNotification", "UpgradeAvailable", "1", RegistryValueKind.DWord);
+        }
     }
 }

+ 2 - 0
Optimizer/Options.cs

@@ -48,6 +48,7 @@ namespace Optimizer
         public bool DisableXboxLive { get; set; }
         public bool DisableGameBar { get; set; }
         public bool DisableInsiderService { get; set; }
+        public bool DisableFeatureUpdates { get; set; }
 
         public bool DisableOneDrive { get; set; }
     }
@@ -181,6 +182,7 @@ namespace Optimizer
                 CurrentOptions.DisableXboxLive = false;
                 CurrentOptions.DisableGameBar = false;
                 CurrentOptions.DisableInsiderService = false;
+                CurrentOptions.DisableFeatureUpdates = false;
 
                 CurrentOptions.DisableOneDrive = false;
 

+ 1 - 1
Optimizer/Program.cs

@@ -18,7 +18,7 @@ namespace Optimizer
 
         // Enter current version here
         internal readonly static float Major = 4;
-        internal readonly static float Minor = 0;
+        internal readonly static float Minor = 1;
 
         internal static string GetCurrentVersionTostring()
         {

+ 2 - 2
README.md

@@ -37,5 +37,5 @@ https://github.com/hellzerg/optimizer/blob/master/IMAGES.md
 
 ## Details: ##
 
-* Latest version: 4.0
-* Released: February 21, 2018
+* Latest version: 4.1
+* Released: March 9, 2018

+ 1 - 1
version.txt

@@ -1 +1 @@
-4.0
+4.1