Portable Tool for an Ideal Windows Setup
C# activatorbloatware-removalcsharpdebloatdebloaterdisable-servicesmonitoring-systemportableprivacy-toolsregistry-tweakssystem-tuningsystem-utilitytelemetrytweakerwindows-10windows-11windows-debloatwindows-defenderwindows-optimizationwindows-tweaks
v 4.90.1 -refactoring (working with Firewall) -add tweaks disable overlay (gamebar) with remove xbox and disable game mode
Greedeks08aa4bb30764
diff --git a/.Source/GTweak/Language/lang.ru.xaml b/.Source/GTweak/Language/lang.ru.xamlindex 9facb5ed..28da2ada 100644--- a/.Source/GTweak/Language/lang.ru.xaml+++ b/.Source/GTweak/Language/lang.ru.xaml@@ -322,6 +322,8 @@<v:String x:Key="tgl18_system">Использовать обычную схему электропитания</v:String><v:String x:Key="tgl19_system">Функция Bluetooth и устройства</v:String><v:String x:Key="tgl20_system">Брандмауэр Защитника Windows</v:String>+ <v:String x:Key="tgl21_system">Функция Windows «Игровой режим»</v:String>+ <v:String x:Key="tgl22_system">Функция Xbox «Игровая панель»</v:String><v:String x:Key="TextSlider1_description_system">Изменяет скорость движения указателя мыши, экономя ваше время для поисков параметров мыши.</v:String><v:String x:Key="TextSlider2_description_system">Изменят задержку перед началом повтора вводимого символа, рекомендованное значение - 0.</v:String>@@ -346,6 +348,8 @@<v:String x:Key="TglButton18_description_system">Добавит слегка измененную схему электропитания «Максимальная Производительность», или в случае её наличия, просто переключит на имеющуюся схему электропитания.</v:String><v:String x:Key="TglButton19_description_system">Если вам не нужен Bluetooth и вы не хотите использовать устройства по Bluetooth. То отключайте его, так же уберет иконку с панели задач.</v:String><v:String x:Key="TglButton20_description_system">Брандмауэр позволяет вам разрешить или запретить программам выход в интернет, а так же контролировать трафик. Что делает его полезным, если вы намерено хотетите и знаете что делаете, то отключайте. А так не рекомендовано этого делать.</v:String>+ <v:String x:Key="TglButton21_description_system">Игровой режим не оказывает большое влияния на мощные системы. Однако если у вас много процессов, работающих в фоновом режиме, то режим гарантирует, что фоновые процессы не будут влиять на работу игры.</v:String>+ <v:String x:Key="TglButton22_description_system">Функция для записи ваших игр. По большому счету использует в пустую ресурсы вашей системы. Есть много лучших альтернатив, да и в добавок которые не открываются спонтанно.</v:String><!--#endregion--><!--#region Information System Page -->diff --git a/.Source/GTweak/Language/lang.xaml b/.Source/GTweak/Language/lang.xamlindex b2aa1581..22a01cb9 100644--- a/.Source/GTweak/Language/lang.xaml+++ b/.Source/GTweak/Language/lang.xaml@@ -322,6 +322,8 @@<v:String x:Key="tgl18_system">Use a conventional power supply circuit</v:String><v:String x:Key="tgl19_system">Bluetooth and device function</v:String><v:String x:Key="tgl20_system">Windows Defender Firewall</v:String>+ <v:String x:Key="tgl21_system">Windows feature «Game Mode»</v:String>+ <v:String x:Key="tgl22_system">Xbox feature «Game Bar»</v:String><v:String x:Key="TextSlider1_description_system">Changes the speed of the mouse pointer, saving you time to search for mouse parameters.</v:String><v:String x:Key="TextSlider2_description_system">Will change the delay before starting to repeat the entered character, the recommended value is 0.</v:String>@@ -346,6 +348,8 @@<v:String x:Key="TglButton18_description_system">Will add a slightly modified «Maximum Performance» power supply circuit, or if available, simply switch to the existing power supply circuit.</v:String><v:String x:Key="TglButton19_description_system">If you don't need Bluetooth and you don't want to use Bluetooth devices. Then disable it, it will also remove the icon from the taskbar.</v:String><v:String x:Key="TglButton20_description_system">The firewall allows you to allow or deny programs access to the Internet, as well as control traffic. Which makes it useful, if you intentionally want to and know what you're doing, then turn it off. And it is not recommended to do this.</v:String>+ <v:String x:Key="TglButton21_description_system">The game mode does not have much effect on powerful systems. However, if you have a lot of processes running in the background, then the mode ensures that background processes will not affect the operation of the game.</v:String>+ <v:String x:Key="TglButton22_description_system">A function for recording your games. By and large, it uses up the resources of your system. There are many better alternatives, and in addition, which do not open spontaneously.</v:String><!--#endregion--><!--#region Information System Page -->diff --git a/.Source/GTweak/Properties/AssemblyInfo.cs b/.Source/GTweak/Properties/AssemblyInfo.csindex 0d986efc..65c01a19 100644--- a/.Source/GTweak/Properties/AssemblyInfo.cs+++ b/.Source/GTweak/Properties/AssemblyInfo.cs@@ -10,8 +10,8 @@ using System.Windows;[assembly: AssemblyCopyright("Copyright © 2024 Greedeks")][assembly: AssemblyTrademark("Greedeks")][assembly: AssemblyCulture("")]-[assembly: AssemblyInformationalVersion("Build: 4.90.0")]-[assembly: AssemblyFileVersion("4.90.0")]+[assembly: AssemblyInformationalVersion("Build: 4.90.1")]+[assembly: AssemblyFileVersion("4.90.1")][assembly: ComVisible(false)]diff --git a/.Source/GTweak/Utilities/Tweaks/Firewall.cs b/.Source/GTweak/Utilities/Tweaks/Firewall.csindex 566e0547..42cba9a6 100644--- a/.Source/GTweak/Utilities/Tweaks/Firewall.cs+++ b/.Source/GTweak/Utilities/Tweaks/Firewall.cs@@ -1,5 +1,6 @@using NetFwTypeLib;using System;+using System.Collections.Generic;using System.Diagnostics;using System.Threading.Tasks;using System.Windows;@@ -9,6 +10,12 @@ namespace GTweak.Utilities.Tweaksinternal abstract class Firewall{private static readonly string nameRules = @"GTweak - Windows Update blocking";+ private static readonly SortedList<string, string> programPaths = new SortedList<string, string>+ {+ ["MoUso_New"] = @"Windows\UUS\amd64\MoUsoCoreWorker.exe",+ ["MoUso_Old"] = @"Windows\System32\MoUsoCoreWorker.exe",+ ["Uso"] = @"Windows\System32\usoclient.exe",+ };private static bool CheckRulesWindows(string nameRule){bool isCheck = true;@@ -28,24 +35,24 @@ namespace GTweak.Utilities.Tweaksif (CheckRulesWindows(nameRules) && isChoose){Parallel.Invoke(- () => { RulesUpdateIN(isChoose, Settings.PathSystemDisk + @"Windows\UUS\amd64\MoUsoCoreWorker.exe", nameRules); },- () => { RulesUpdateIN(isChoose, Settings.PathSystemDisk + @"Windows\System32\MoUsoCoreWorker.exe", string.Concat(nameRules," (Old Way)")); },- () => { RulesUpdateIN(isChoose, Settings.PathSystemDisk + @"Windows\System32\usoclient.exe", string.Concat(nameRules," (Update Orchestrator)")); },- () => { RulesUpdateOUT(isChoose, Settings.PathSystemDisk + @"Windows\UUS\amd64\MoUsoCoreWorker.exe", nameRules); },- () => { RulesUpdateOUT(isChoose, Settings.PathSystemDisk + @"Windows\System32\MoUsoCoreWorker.exe", string.Concat(nameRules, " (Old Way)")); },- () => { RulesUpdateOUT(isChoose, Settings.PathSystemDisk + @"Windows\System32\usoclient.exe", string.Concat(nameRules, " (Update Orchestrator)")); });+ () => { RulesUpdateIN(isChoose, Settings.PathSystemDisk + programPaths["MoUso_New"], nameRules); },+ () => { RulesUpdateIN(isChoose, Settings.PathSystemDisk + programPaths["MoUso_Old"], string.Concat(nameRules," (Old Way)")); },+ () => { RulesUpdateIN(isChoose, Settings.PathSystemDisk + programPaths["Uso"], string.Concat(nameRules," (Update Orchestrator)")); },+ () => { RulesUpdateOUT(isChoose, Settings.PathSystemDisk + @programPaths["MoUso_New"], nameRules); },+ () => { RulesUpdateOUT(isChoose, Settings.PathSystemDisk + programPaths["MoUso_Old"], string.Concat(nameRules, " (Old Way)")); },+ () => { RulesUpdateOUT(isChoose, Settings.PathSystemDisk + programPaths["Uso"], string.Concat(nameRules, " (Update Orchestrator)")); });}else{try {- RulesUpdateIN(isChoose, Settings.PathSystemDisk + @"Windows\UUS\amd64\MoUsoCoreWorker.exe", nameRules);- RulesUpdateIN(isChoose, Settings.PathSystemDisk + @"Windows\System32\MoUsoCoreWorker.exe", string.Concat(nameRules, " (Old Way)"));- RulesUpdateIN(isChoose, Settings.PathSystemDisk + @"Windows\System32\usoclient.exe", string.Concat(nameRules, " (Update Orchestrator)"));+ RulesUpdateIN(isChoose, Settings.PathSystemDisk + programPaths["MoUso_New"], nameRules);+ RulesUpdateIN(isChoose, Settings.PathSystemDisk + programPaths["MoUso_Old"], string.Concat(nameRules, " (Old Way)"));+ RulesUpdateIN(isChoose, Settings.PathSystemDisk + programPaths["Uso"], string.Concat(nameRules, " (Update Orchestrator)"));} catch (Exception ex) { Debug.WriteLine(ex.Message.ToString()); }try {- RulesUpdateOUT(isChoose, Settings.PathSystemDisk + @"Windows\UUS\amd64\MoUsoCoreWorker.exe", nameRules);- RulesUpdateOUT(isChoose, Settings.PathSystemDisk + @"Windows\System32\MoUsoCoreWorker.exe", string.Concat(nameRules, " (Old Way)"));- RulesUpdateOUT(isChoose, Settings.PathSystemDisk + @"Windows\System32\usoclient.exe", string.Concat(nameRules, " (Update Orchestrator)"));+ RulesUpdateOUT(isChoose, Settings.PathSystemDisk + programPaths["MoUso_New"], nameRules);+ RulesUpdateOUT(isChoose, Settings.PathSystemDisk + programPaths["MoUso_Old"], string.Concat(nameRules, " (Old Way)"));+ RulesUpdateOUT(isChoose, Settings.PathSystemDisk + programPaths["Uso"], string.Concat(nameRules, " (Update Orchestrator)"));} catch (Exception ex) { Debug.WriteLine(ex.Message.ToString()); }}}diff --git a/.Source/GTweak/Utilities/Tweaks/SystemTweaks.cs b/.Source/GTweak/Utilities/Tweaks/SystemTweaks.csindex 3475d07b..7f59c183 100644--- a/.Source/GTweak/Utilities/Tweaks/SystemTweaks.cs+++ b/.Source/GTweak/Utilities/Tweaks/SystemTweaks.cs@@ -243,22 +243,44 @@ namespace GTweak.Utilities.TweakselsesystemV.TglButton17.StateNA = false;+if (!Registry.GetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes\" + activeGuid + "", "Description", string.Empty).ToString().Contains("-18") &&!Registry.GetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes\" + activeGuid + "", "FriendlyName", string.Empty).ToString().Contains("-19"))systemV.TglButton18.StateNA = true;elsesystemV.TglButton18.StateNA = false;+if (isBluetoothStatus)systemV.TglButton19.StateNA = true;elsesystemV.TglButton19.StateNA = false;+if (Registry.GetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\mpssvc", "Start", null).ToString() != "4")systemV.TglButton20.StateNA = true;elsesystemV.TglButton20.StateNA = false;++ if (Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\GameBar", "AutoGameModeEnabled", null) == null ||+ Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\GameBar", "AutoGameModeEnabled", null).ToString() != "0" ||+ Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\GameBar", "AllowAutoGameMode", null) == null ||+ Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\GameBar", "AllowAutoGameMode", null).ToString() != "0")+ systemV.TglButton21.StateNA = true;+ else+ systemV.TglButton21.StateNA = false;+++ if (Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\GameBar", "UseNexusForGameBarEnabled", null) == null ||+ Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\GameBar", "UseNexusForGameBarEnabled", null).ToString() != "0" ||+ Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR", "AppCaptureEnabled", null) == null ||+ Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR", "AppCaptureEnabled", null).ToString() != "0" ||+ Registry.GetValue(@"HKEY_CURRENT_USER\System\GameConfigStore", "GameDVR_Enabled", null) == null ||+ Registry.GetValue(@"HKEY_CURRENT_USER\System\GameConfigStore", "GameDVR_Enabled", null).ToString() != "0")+ systemV.TglButton22.StateNA = true;+ else+ systemV.TglButton22.StateNA = false;}internal void ViewBluetoothStatus()@@ -597,6 +619,32 @@ namespace GTweak.Utilities.TweaksRegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile", "EnableFirewall", "0", RegistryValueKind.DWord);}break;+ case "TglButton21":+ if (isChoose)+ {+ RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\GameBar", "AutoGameModeEnabled", 0, RegistryValueKind.DWord);+ RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\GameBar", "AllowAutoGameMode", 0, RegistryValueKind.DWord);+ }+ else+ {+ RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\GameBar", "AutoGameModeEnabled", 1, RegistryValueKind.DWord);+ RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\GameBar", "AllowAutoGameMode", 1, RegistryValueKind.DWord);+ }+ break;+ case "TglButton22":+ if (isChoose)+ {+ RegistryHelp.Write(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR", "AppCaptureEnabled", 0, RegistryValueKind.DWord);+ RegistryHelp.Write(Registry.CurrentUser, @"System\GameConfigStore", "GameDVR_Enabled", 0, RegistryValueKind.DWord);+ RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\GameBar", "UseNexusForGameBarEnabled", 0, RegistryValueKind.DWord);+ }+ else+ {+ RegistryHelp.Write(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR", "AppCaptureEnabled", 1, RegistryValueKind.DWord);+ RegistryHelp.Write(Registry.CurrentUser, @"System\GameConfigStore", "GameDVR_Enabled", 1, RegistryValueKind.DWord);+ RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\GameBar", "UseNexusForGameBarEnabled", 1, RegistryValueKind.DWord);+ }+ break;}}diff --git a/.Source/GTweak/View/SystemView.xaml b/.Source/GTweak/View/SystemView.xamlindex ace57cd3..9cd936c9 100644--- a/.Source/GTweak/View/SystemView.xaml+++ b/.Source/GTweak/View/SystemView.xaml@@ -48,6 +48,7 @@<uc:ToggleButton x:Name="TglButton6" Height="25" Width="Auto" Margin="20,20,0,0" DynamicText="{DynamicResource tgl6_system}" MouseEnter="Tweak_MouseEnter" MouseLeave="Tweak_MouseLeave" ChangedState="TglButton_ChangedState"/><uc:ToggleButton x:Name="TglButton7" Height="25" Width="Auto" Margin="20,20,0,0" DynamicText="{DynamicResource tgl7_system}" MouseEnter="Tweak_MouseEnter" MouseLeave="Tweak_MouseLeave" ChangedState="TglButton_ChangedState"/><uc:ToggleButton x:Name="TglButton19" Height="25" Width="Auto" Margin="20,20,0,0" DynamicText="{DynamicResource tgl19_system}" MouseEnter="Tweak_MouseEnter" MouseLeave="Tweak_MouseLeave" ChangedState="TglButton_ChangedState"/>+ <uc:ToggleButton x:Name="TglButton21" Height="25" Width="Auto" Margin="20,20,0,0" DynamicText="{DynamicResource tgl21_system}" MouseEnter="Tweak_MouseEnter" MouseLeave="Tweak_MouseLeave" ChangedState="TglButton_ChangedState"/></StackPanel></Grid>@@ -65,6 +66,7 @@<uc:ToggleButton x:Name="TglButton17" Height="25" Width="Auto" Margin="20,20,0,0" DynamicText="{DynamicResource tgl17_system}" MouseEnter="Tweak_MouseEnter" MouseLeave="Tweak_MouseLeave" ChangedState="TglButton_ChangedState"/><uc:ToggleButton x:Name="TglButton18" Height="25" Width="Auto" Margin="20,20,0,0" DynamicText="{DynamicResource tgl18_system}" MouseEnter="Tweak_MouseEnter" MouseLeave="Tweak_MouseLeave" ChangedState="TglButton_ChangedState"/><uc:ToggleButton x:Name="TglButton20" Height="25" Width="Auto" Margin="20,20,0,0" DynamicText="{DynamicResource tgl20_system}" MouseEnter="Tweak_MouseEnter" MouseLeave="Tweak_MouseLeave" ChangedState="TglButton_ChangedState"/>+ <uc:ToggleButton x:Name="TglButton22" Height="25" Width="Auto" Margin="20,20,0,0" DynamicText="{DynamicResource tgl22_system}" MouseEnter="Tweak_MouseEnter" MouseLeave="Tweak_MouseLeave" ChangedState="TglButton_ChangedState"/></StackPanel></Grid></Grid>