Portable Tool for an Ideal Windows Setup
C# activatorbloatware-removalcsharpdebloatdebloaterdisable-servicesmonitoring-systemportableprivacy-toolsregistry-tweakssystem-tuningsystem-utilitytelemetrytweakerwindows-10windows-11windows-debloatwindows-defenderwindows-optimizationwindows-tweaks
-removing associations & re
Greedeksce8508bf2491
diff --git a/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.cs b/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.csindex b634a54d..8a397a45 100644--- a/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.cs+++ b/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.cs@@ -251,6 +251,36 @@ namespace GTweak.Utilities.TweaksRegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\PrintNotify", "Start", isChoose ? 4 : 3, RegistryValueKind.DWord);RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\McpManagementService", "Start", isChoose ? 4 : 3, RegistryValueKind.DWord);RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\Spooler", "DelayedAutoStart", isChoose ? 1 : 0, RegistryValueKind.DWord);+ try+ {+ using RegistryKey baseKey = Registry.ClassesRoot.OpenSubKey("SystemFileAssociations", true);+ if (baseKey != null)+ {+ foreach (string subkey in baseKey.GetSubKeyNames())+ {+ try+ {+ using RegistryKey assocKey = baseKey.OpenSubKey(subkey, true);+ if (assocKey != null)+ {+ using RegistryKey shellKey = assocKey.OpenSubKey("Shell", true);+ if (shellKey != null)+ {+ if (shellKey.GetSubKeyNames().Any(k => k.Equals("print", StringComparison.OrdinalIgnoreCase)))+ {+ if (isChoose)+ RegistryHelp.Write(Registry.ClassesRoot, $@"SystemFileAssociations\{subkey}\shell\print", "ProgrammaticAccessOnly", string.Empty, RegistryValueKind.String);+ else+ RegistryHelp.DeleteValue(Registry.ClassesRoot, $@"SystemFileAssociations\{subkey}\shell\print", "ProgrammaticAccessOnly");+ }+ }+ }+ }+ catch (Exception ex) { Debug.WriteLine(ex.Message); }+ }+ }+ }+ catch (Exception ex) { Debug.WriteLine(ex.Message); }break;case "TglButton9":RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\WiaRpc", "Start", isChoose ? 4 : 3, RegistryValueKind.DWord);diff --git a/.Source/GTweak/Utilities/Tweaks/UninstallingPakages.cs b/.Source/GTweak/Utilities/Tweaks/UninstallingPakages.csindex 96ebf0a9..6e430141 100644--- a/.Source/GTweak/Utilities/Tweaks/UninstallingPakages.cs+++ b/.Source/GTweak/Utilities/Tweaks/UninstallingPakages.cs@@ -133,6 +133,47 @@ namespace GTweak.Utilities.TweaksRegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Personalization\Settings", "AcceptedPrivacyPolicy", 0, RegistryValueKind.DWord);RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Windows Search", "CortanaConsent", 0, RegistryValueKind.DWord);break;+ case "Phone":+ if (RegistryHelp.KeyExists(Registry.ClassesRoot, @"*\shellex\ContextMenuHandlers\ModernSharing", false))+ {+ RegistryHelp.DeleteFolderTree(Registry.ClassesRoot, @"*\shellex\ContextMenuHandlers\SendTo");+ RegistryHelp.DeleteFolderTree(Registry.ClassesRoot, @"*\shellex\ContextMenuHandlers\ModernShare");+ }+ else+ {+ RegistryHelp.DeleteFolderTree(Registry.ClassesRoot, @"AllFilesystemObjects\shellex\ContextMenuHandlers\SendTo");+ RegistryHelp.DeleteFolderTree(Registry.ClassesRoot, @"AllFilesystemObjects\shellex\ContextMenuHandlers\ModernSharing");+ }+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $@"cmd.exe /c reg delete ""HKEY_CLASSES_ROOT\CLSID\{{7AD84985-87B4-4a16-BE58-8B72A5B390F7}}"" /f & reg delete ""HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{{7AD84985-87B4-4a16-BE58-8B72A5B390F7}}"" /f");+ break;+ case "Paint3D":+ try+ {+ using RegistryKey baseKey = Registry.ClassesRoot.OpenSubKey("SystemFileAssociations", true);+ if (baseKey != null)+ {+ foreach (string subkey in baseKey.GetSubKeyNames())+ {+ try+ {+ using RegistryKey assocKey = baseKey.OpenSubKey(subkey, true);+ if (assocKey != null)+ {+ using RegistryKey shellKey = assocKey.OpenSubKey("Shell", true);+ if (shellKey != null)+ {+ if (shellKey.GetSubKeyNames().Any(k => k.Equals("3D Print", StringComparison.OrdinalIgnoreCase)))+ RegistryHelp.DeleteFolderTree(Registry.ClassesRoot, $@"SystemFileAssociations\{subkey}\shell\3D Print");+ }+ }+ }+ catch (Exception ex) { Debug.WriteLine(ex.Message); }+ }+ baseKey.Close();+ }+ }+ catch (Exception ex) { Debug.WriteLine(ex.Message); }+ break;case "Edge":string script = $@"$region = (Get-ItemProperty -Path 'Registry::HKEY_USERS\.DEFAULT\Control Panel\International\Geo').Namediff --git a/.Source/GTweak/View/ConfidentialityView.xaml b/.Source/GTweak/View/ConfidentialityView.xamlindex a0a6e0d9..4c8cd6b8 100644--- a/.Source/GTweak/View/ConfidentialityView.xaml+++ b/.Source/GTweak/View/ConfidentialityView.xaml@@ -5,8 +5,7 @@xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:local="clr-namespace:GTweak.View"xmlns:uc="clr-namespace:GTweak.Assets.UserControl"- mc:Ignorable="d"- d:DesignHeight="550" d:DesignWidth="1100"+ mc:Ignorable="d" d:DesignHeight="550" d:DesignWidth="1100"Style="{StaticResource LaunchPage}" Loaded="Page_Loaded"><Grid><Grid.RowDefinitions>diff --git a/.Source/GTweak/View/DataSystemView.xaml b/.Source/GTweak/View/DataSystemView.xamlindex 1fffa67d..5c3c6b50 100644--- a/.Source/GTweak/View/DataSystemView.xaml+++ b/.Source/GTweak/View/DataSystemView.xaml@@ -4,10 +4,9 @@xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:local="clr-namespace:GTweak.View"- mc:Ignorable="d"xmlns:vm="clr-namespace:GTweak.Core.ViewModel"xmlns:xrpb="http://XamlRadialProgressBar/DotNet"- d:DesignHeight="550" d:DesignWidth="1100"+ mc:Ignorable="d" d:DesignHeight="550" d:DesignWidth="1100"Style="{StaticResource LaunchPage}" Unloaded="Page_Unloaded"><UserControl.DataContext><vm:DataSystemVM />diff --git a/.Source/GTweak/View/InterfaceView.xaml b/.Source/GTweak/View/InterfaceView.xamlindex 5eeeef76..d2689166 100644--- a/.Source/GTweak/View/InterfaceView.xaml+++ b/.Source/GTweak/View/InterfaceView.xaml@@ -5,9 +5,8 @@xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:local="clr-namespace:GTweak.View"xmlns:uc="clr-namespace:GTweak.Assets.UserControl"- mc:Ignorable="d"- xmlns:vm="clr-namespace:GTweak.Core.ViewModel"- d:DesignHeight="550" d:DesignWidth="1100"+ xmlns:vm="clr-namespace:GTweak.Core.ViewModel"+ mc:Ignorable="d" d:DesignHeight="550" d:DesignWidth="1100"Style="{StaticResource LaunchPage}" Loaded="Page_Loaded"><UserControl.DataContext><vm:InterfaceVM/>diff --git a/.Source/GTweak/View/MoreView.xaml b/.Source/GTweak/View/MoreView.xamlindex 48a8e23f..01162d47 100644--- a/.Source/GTweak/View/MoreView.xaml+++ b/.Source/GTweak/View/MoreView.xaml@@ -5,9 +5,7 @@xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:local="clr-namespace:GTweak.View"xmlns:UserControl="clr-namespace:GTweak.Assets.UserControl"- mc:Ignorable="d"- d:DesignHeight="550" d:DesignWidth="1100"- Style="{StaticResource LaunchPage}">+ mc:Ignorable="d" d:DesignHeight="550" d:DesignWidth="1100" Style="{StaticResource LaunchPage}"><Grid><Grid.RowDefinitions><RowDefinition/>@@ -15,7 +13,11 @@</Grid.RowDefinitions><Grid Grid.Row="0">- <TextBlock Width="Auto" Height="auto" FontFamily="{StaticResource Jura}" FontSize="13pt" Foreground="{StaticResource Color_TetBlock_Inactivity}" HorizontalAlignment="Center" VerticalAlignment="Top" KeyboardNavigation.IsTabStop="False" Margin="0,10,0,0"><Run Text="{DynamicResource text0_more}"/><Run Text=" "/><Run Text="{DynamicResource text1_more}" Foreground="{StaticResource Color_Accent}"/><Run Text=" "/><Run Text="{DynamicResource text2_more}"/></TextBlock>+ <TextBlock x:Name="test" Width="Auto" Height="auto" FontFamily="{StaticResource Jura}" FontSize="13pt" Foreground="{StaticResource Color_TetBlock_Inactivity}" HorizontalAlignment="Center" VerticalAlignment="Top" KeyboardNavigation.IsTabStop="False" Margin="0,10,0,0">+ <Run Text="{DynamicResource text0_more}"/>+ <Run Text="{DynamicResource text1_more}" Foreground="{StaticResource Color_Accent}"/>+ <Run Text="{DynamicResource text2_more}"/>+ </TextBlock></Grid><UniformGrid Grid.Row="1" Columns="1">diff --git a/.Source/GTweak/View/PakagesView.xaml b/.Source/GTweak/View/PakagesView.xamlindex 0472e540..d39daf6d 100644--- a/.Source/GTweak/View/PakagesView.xaml+++ b/.Source/GTweak/View/PakagesView.xaml@@ -5,8 +5,7 @@xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:uc="clr-namespace:GTweak.Assets.UserControl"xmlns:local="clr-namespace:GTweak.View"- mc:Ignorable="d"- d:DesignHeight="550" d:DesignWidth="1100"+ mc:Ignorable="d" d:DesignHeight="550" d:DesignWidth="1100"Style="{StaticResource LaunchPage}" Loaded="Page_Loaded"><Grid><Grid.RowDefinitions>diff --git a/.Source/GTweak/View/ServicesView.xaml b/.Source/GTweak/View/ServicesView.xamlindex 6003c144..d9c4c492 100644--- a/.Source/GTweak/View/ServicesView.xaml+++ b/.Source/GTweak/View/ServicesView.xaml@@ -5,8 +5,7 @@xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:local="clr-namespace:GTweak.View"xmlns:uc="clr-namespace:GTweak.Assets.UserControl"- mc:Ignorable="d"- d:DesignHeight="550" d:DesignWidth="1100"+ mc:Ignorable="d" d:DesignHeight="550" d:DesignWidth="1100"Style="{StaticResource LaunchPage}" Loaded="Page_Loaded"><Grid><Grid.RowDefinitions>diff --git a/.Source/GTweak/View/SystemView.xaml b/.Source/GTweak/View/SystemView.xamlindex 0f3064cc..74817590 100644--- a/.Source/GTweak/View/SystemView.xaml+++ b/.Source/GTweak/View/SystemView.xaml@@ -5,8 +5,7 @@xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:uc="clr-namespace:GTweak.Assets.UserControl"xmlns:local="clr-namespace:GTweak.View"- mc:Ignorable="d"- d:DesignHeight="550" d:DesignWidth="1100"+ mc:Ignorable="d" d:DesignHeight="550" d:DesignWidth="1100"Style="{StaticResource LaunchPage}" Loaded="Page_Loaded"><Grid><Grid.RowDefinitions>diff --git a/.Source/GTweak/Windows/LoadingWindow.xaml b/.Source/GTweak/Windows/LoadingWindow.xamlindex 96490a54..cc343488 100644--- a/.Source/GTweak/Windows/LoadingWindow.xaml+++ b/.Source/GTweak/Windows/LoadingWindow.xaml@@ -8,8 +8,8 @@xmlns:local="clr-namespace:GTweak.Windows"mc:Ignorable="d"Title="GTweak" WindowStyle="None"- Height="260" Width="260"- Background="Transparent" AllowsTransparency="True" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize" SnapsToDevicePixels="True" UseLayoutRounding="True"+ Height="260" Width="260" Background="Transparent" AllowsTransparency="True" WindowStartupLocation="CenterScreen"+ ResizeMode="CanMinimize" SnapsToDevicePixels="True" UseLayoutRounding="True"IsTabStop="False" Opacity="0.98" ContentRendered="Window_ContentRendered" Closing="Window_Closing"><Window.DataContext><vm:MainViewModel/>diff --git a/.Source/GTweak/Windows/MainWindow.xaml.cs b/.Source/GTweak/Windows/MainWindow.xaml.csindex 4dd8ff04..22e65528 100644--- a/.Source/GTweak/Windows/MainWindow.xaml.cs+++ b/.Source/GTweak/Windows/MainWindow.xaml.cs@@ -1,8 +1,10 @@using GTweak.Utilities.Configuration;using GTweak.Utilities.Control;+using GTweak.Utilities.Helpers;using GTweak.Utilities.Helpers.Animation;using GTweak.Utilities.Tweaks;using GTweak.Windows;+using Microsoft.Win32;using System;using System.ComponentModel;using System.Diagnostics;