Portable Tool for an Ideal Windows Setup
C# activatorbloatware-removalcsharpdebloatdebloaterdisable-servicesmonitoring-systemportableprivacy-toolsregistry-tweakssystem-tuningsystem-utilitytelemetrytweakerwindows-10windows-11windows-debloatwindows-defenderwindows-optimizationwindows-tweaks
improving the file structure hierarchy / re
Greedekse066d9efa106
diff --git a/.Source/GTweak/App.xaml.cs b/.Source/GTweak/App.xaml.csindex c66884b7..d2832db7 100644--- a/.Source/GTweak/App.xaml.cs+++ b/.Source/GTweak/App.xaml.cs@@ -29,13 +29,13 @@ namespace GTweak{if (e.Args.Any(arg => arg.Equals("uninstall", StringComparison.OrdinalIgnoreCase))){- SettingsRepository.SelfRemoval();+ SettingsEngine.SelfRemoval();return;}- SettingsRepository.СheckingParameters();- BlockRunTweaker.CheckingApplicationCopies();- await BlockRunTweaker.CheckingSystemRequirements();+ SettingsEngine.СheckingParameters();+ RunGuard.CheckingApplicationCopies();+ await RunGuard.CheckingSystemRequirements();new LoadingWindow().Show();}diff --git a/.Source/GTweak/Assets/UserControl/Comment.xaml.cs b/.Source/GTweak/Assets/UserControl/Comment.xaml.csindex f3fc9deb..e214627d 100644--- a/.Source/GTweak/Assets/UserControl/Comment.xaml.cs+++ b/.Source/GTweak/Assets/UserControl/Comment.xaml.cs@@ -1,4 +1,4 @@-using GTweak.Utilities.Helpers.Animation;+using GTweak.Utilities.Animation;using System;using System.Windows;diff --git a/.Source/GTweak/Assets/UserControl/ToggleButton.xaml.cs b/.Source/GTweak/Assets/UserControl/ToggleButton.xaml.csindex 9123ea1e..a61aac91 100644--- a/.Source/GTweak/Assets/UserControl/ToggleButton.xaml.cs+++ b/.Source/GTweak/Assets/UserControl/ToggleButton.xaml.cs@@ -1,4 +1,4 @@-using GTweak.Utilities.Helpers.Animation;+using GTweak.Utilities.Animation;using System;using System.Windows;using System.Windows.Controls;diff --git a/.Source/GTweak/Core/ViewModel/DataSystemVM.cs b/.Source/GTweak/Core/ViewModel/DataSystemVM.csindex 5d0f2bb0..097e574f 100644--- a/.Source/GTweak/Core/ViewModel/DataSystemVM.cs+++ b/.Source/GTweak/Core/ViewModel/DataSystemVM.cs@@ -48,12 +48,12 @@ namespace GTweak.Core.ViewModelpublic bool StateButton{- get => SettingsRepository.IsHiddenIpAddress;+ get => SettingsEngine.IsHiddenIpAddress;set{- if (SettingsRepository.IsHiddenIpAddress != value)+ if (SettingsEngine.IsHiddenIpAddress != value){- SettingsRepository.IsHiddenIpAddress = value;+ SettingsEngine.IsHiddenIpAddress = value;OnPropertyChanged();}}@@ -79,7 +79,7 @@ namespace GTweak.Core.ViewModelnew DataSystemModel { Name = "IpAddress", Data = SystemDiagnostics.HardwareData.UserIPAddress }};- SetBlurValue = (SystemDiagnostics.isIPAddressFormatValid && SettingsRepository.IsHiddenIpAddress) ? 20 : 0;+ SetBlurValue = (SystemDiagnostics.isIPAddressFormatValid && SettingsEngine.IsHiddenIpAddress) ? 20 : 0;SetVisibility = SystemDiagnostics.isIPAddressFormatValid ? Visibility.Visible : Visibility.Hidden;}}diff --git a/.Source/GTweak/GTweak.csproj b/.Source/GTweak/GTweak.csprojindex 729064f2..a0a1e642 100644--- a/.Source/GTweak/GTweak.csproj+++ b/.Source/GTweak/GTweak.csproj@@ -269,24 +269,25 @@<DesignTime>True</DesignTime><DependentUpon>Resources.resx</DependentUpon></Compile>- <Compile Include="Utilities\Controls\BlockRunTweaker.cs" />+ <Compile Include="Utilities\Controls\RunGuard.cs" /><Compile Include="Utilities\Controls\ErrorLogging.cs" />- <Compile Include="Utilities\Helpers\Animation\FadeAnimation.cs" />+ <Compile Include="Utilities\Animation\FadeAnimation.cs" />+ <Compile Include="Utilities\Controls\PathLocator.cs" /><Compile Include="Utilities\Helpers\DisablingWinKeys.cs" /><Compile Include="Utilities\Helpers\CommandExecutor.cs" />- <Compile Include="Utilities\Helpers\Managers\ExplorerManager.cs" />- <Compile Include="Utilities\Helpers\Storage\WinKeyStorage.cs" />- <Compile Include="Utilities\Helpers\Managers\TaskSchedulerManager.cs" />- <Compile Include="Utilities\Helpers\Managers\ArchiveManager.cs" />+ <Compile Include="Utilities\Managers\ExplorerManager.cs" />+ <Compile Include="Utilities\Storage\WinKeyStorage.cs" />+ <Compile Include="Utilities\Managers\TaskSchedulerManager.cs" />+ <Compile Include="Utilities\Managers\ArchiveManager.cs" /><Compile Include="Utilities\Helpers\BackgroundQueue.cs" /><Compile Include="Utilities\Helpers\RegistryHelp.cs" />- <Compile Include="Utilities\Controls\SettingsRepository.cs" />+ <Compile Include="Utilities\Controls\SettingsEngine.cs" /><Compile Include="Utilities\Helpers\TakingOwnership.cs" /><Compile Include="Utilities\Tweaks\ClearingMemory.cs" />- <Compile Include="Utilities\Helpers\Managers\INIManager.cs" />+ <Compile Include="Utilities\Managers\INIManager.cs" /><Compile Include="Utilities\Configuration\MonitoringSystem.cs" /><Compile Include="Utilities\Configuration\SystemDiagnostics.cs" />- <Compile Include="Utilities\Helpers\Managers\NotificationManager.cs" />+ <Compile Include="Utilities\Managers\NotificationManager.cs" /><Compile Include="Utilities\Helpers\TrustedInstaller.cs" /><Compile Include="Utilities\Tweaks\ConfidentialityTweaks.cs" /><Compile Include="Utilities\Tweaks\DefenderManager\BackupRights.cs" />@@ -296,11 +297,11 @@<Compile Include="Utilities\Tweaks\ServicesTweaks.cs" /><Compile Include="Utilities\Tweaks\SystemMaintenance.cs" /><Compile Include="Utilities\Tweaks\SystemTweaks.cs" />- <Compile Include="Utilities\Helpers\Storage\TaskStorage.cs" />+ <Compile Include="Utilities\Storage\TaskStorage.cs" /><Compile Include="Utilities\Tweaks\UninstallingPakages.cs" /><Compile Include="Utilities\Tweaks\DefenderManager\WindowsDefender.cs" /><Compile Include="Utilities\Tweaks\WindowsLicense.cs" />- <Compile Include="Utilities\Helpers\Animation\TypewriterAnimation.cs" />+ <Compile Include="Utilities\Animation\TypewriterAnimation.cs" /><Compile Include="Core\ViewModel\OtherContextVM.cs" /><Compile Include="Windows\ImportWindow.xaml.cs"><DependentUpon>ImportWindow.xaml</DependentUpon>@@ -502,7 +503,7 @@<Compile Include="Assets\UserControl\ToggleButton.xaml.cs"><DependentUpon>ToggleButton.xaml</DependentUpon></Compile>- <Compile Include="Utilities\Helpers\Animation\BrushAnimation.cs" />+ <Compile Include="Utilities\Animation\BrushAnimation.cs" /><Compile Include="Core\ButtonNavigation.cs" /><Compile Include="Core\RelayCommand.cs" /><Compile Include="Core\ViewModelBase.cs" />diff --git a/.Source/GTweak/Utilities/Helpers/Animation/BrushAnimation.cs b/.Source/GTweak/Utilities/Animation/BrushAnimation.cssimilarity index 97%rename from .Source/GTweak/Utilities/Helpers/Animation/BrushAnimation.csrename to .Source/GTweak/Utilities/Animation/BrushAnimation.csindex 1e9a548c..269ef264 100644--- a/.Source/GTweak/Utilities/Helpers/Animation/BrushAnimation.cs+++ b/.Source/GTweak/Utilities/Animation/BrushAnimation.cs@@ -4,7 +4,7 @@ using System.Windows.Controls;using System.Windows.Media;using System.Windows.Media.Animation;-namespace GTweak.Utilities.Helpers.Animation+namespace GTweak.Utilities.Animation{internal sealed class BrushAnimation : AnimationTimeline{diff --git a/.Source/GTweak/Utilities/Helpers/Animation/FadeAnimation.cs b/.Source/GTweak/Utilities/Animation/FadeAnimation.cssimilarity index 96%rename from .Source/GTweak/Utilities/Helpers/Animation/FadeAnimation.csrename to .Source/GTweak/Utilities/Animation/FadeAnimation.csindex 96b41ef6..1d6e9748 100644--- a/.Source/GTweak/Utilities/Helpers/Animation/FadeAnimation.cs+++ b/.Source/GTweak/Utilities/Animation/FadeAnimation.cs@@ -2,7 +2,7 @@using System.Windows;using System.Windows.Media.Animation;-namespace GTweak.Utilities.Helpers.Animation+namespace GTweak.Utilities.Animation{internal static class FadeAnimation{diff --git a/.Source/GTweak/Utilities/Helpers/Animation/TypewriterAnimation.cs b/.Source/GTweak/Utilities/Animation/TypewriterAnimation.cssimilarity index 97%rename from .Source/GTweak/Utilities/Helpers/Animation/TypewriterAnimation.csrename to .Source/GTweak/Utilities/Animation/TypewriterAnimation.csindex 3fcd109a..4564d64b 100644--- a/.Source/GTweak/Utilities/Helpers/Animation/TypewriterAnimation.cs+++ b/.Source/GTweak/Utilities/Animation/TypewriterAnimation.cs@@ -3,7 +3,7 @@ using System.Windows;using System.Windows.Controls;using System.Windows.Media.Animation;-namespace GTweak.Utilities.Helpers.Animation+namespace GTweak.Utilities.Animation{internal sealed class TypewriterAnimation{diff --git a/.Source/GTweak/Utilities/Configuration/SystemDiagnostics.cs b/.Source/GTweak/Utilities/Configuration/SystemDiagnostics.csindex 63234cec..b5d40899 100644--- a/.Source/GTweak/Utilities/Configuration/SystemDiagnostics.cs+++ b/.Source/GTweak/Utilities/Configuration/SystemDiagnostics.cs@@ -506,7 +506,7 @@ namespace GTweak.Utilities.Configurationinternal void ValidateVersionUpdates(){- if (!SettingsRepository.IsUpdateCheckRequired || !IsNetworkAvailable())+ if (!SettingsEngine.IsUpdateCheckRequired || !IsNetworkAvailable())return;try@@ -522,7 +522,7 @@ namespace GTweak.Utilities.Configurationstring DataAsJson = sreader.ReadToEnd();GitMetadata gitVersionUtility = JsonConvert.DeserializeObject<GitMetadata>(DataAsJson);- if (!string.IsNullOrWhiteSpace(gitVersionUtility.СurrentVersion) && gitVersionUtility.СurrentVersion.CompareTo(SettingsRepository.currentRelease) > 0)+ if (!string.IsNullOrWhiteSpace(gitVersionUtility.СurrentVersion) && gitVersionUtility.СurrentVersion.CompareTo(SettingsEngine.currentRelease) > 0){IsNeedUpdate = true;DownloadVersion = gitVersionUtility.СurrentVersion;diff --git a/.Source/GTweak/Utilities/Controls/ErrorLogging.cs b/.Source/GTweak/Utilities/Controls/ErrorLogging.csindex 1fe0e0ce..eb18b85b 100644--- a/.Source/GTweak/Utilities/Controls/ErrorLogging.cs+++ b/.Source/GTweak/Utilities/Controls/ErrorLogging.cs@@ -36,7 +36,7 @@ namespace GTweak.Utilities.Controls{try{- using (FileStream stream = new FileStream(StoragePaths.LogFile, FileMode.OpenOrCreate, FileAccess.Write, FileShare.Read))+ using (FileStream stream = new FileStream(PathLocator.Files.ErrorLog, FileMode.OpenOrCreate, FileAccess.Write, FileShare.Read))using (StreamWriter writer = new StreamWriter(stream, Encoding.UTF8)){await writer.WriteLineAsync($"[{DateTime.Now}]\nMember: {memberName}\nError: {ex.Message}\nStack Trace:\n{ex.StackTrace}\n");@@ -45,7 +45,7 @@ namespace GTweak.Utilities.Controlsawait EnsureAssociation();- if (File.Exists(StoragePaths.LogFile))+ if (File.Exists(PathLocator.Files.ErrorLog)){try{@@ -53,7 +53,7 @@ namespace GTweak.Utilities.ControlsProcess.Start(new ProcessStartInfo{- FileName = StoragePaths.LogFile,+ FileName = PathLocator.Files.ErrorLog,UseShellExecute = true});}diff --git a/.Source/GTweak/Utilities/Controls/PathLocator.cs b/.Source/GTweak/Utilities/Controls/PathLocator.csnew file mode 100644index 00000000..c94ce598--- /dev/null+++ b/.Source/GTweak/Utilities/Controls/PathLocator.cs@@ -0,0 +1,34 @@+using System;+using System.IO;++namespace GTweak.Utilities.Controls+{+ internal class PathLocator+ {+ internal static class Folders+ {+ internal static readonly string Workspace = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "GTweak");++ internal static readonly string SystemDrive = Path.GetPathRoot(Environment.GetFolderPath(Environment.SpecialFolder.System));+ }++ internal static class Files+ {+ internal static string Config = string.Empty;++ internal static readonly string Hosts = Path.Combine(Environment.SystemDirectory, @"drivers\etc\hosts");++ internal static readonly string PowPlan = Path.Combine(Folders.Workspace, "UltimatePerformance.pow");++ internal static readonly string BlankIcon = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "Blank.ico");++ internal static readonly string ErrorLog = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "GTweak_Error.log");+ }++ internal static class Registry+ {+ internal const string SubKey = @"Software\GTweak";+ internal static readonly string BaseKey = @$"HKEY_CURRENT_USER\{SubKey}";+ }+ }+}diff --git a/.Source/GTweak/Utilities/Controls/BlockRunTweaker.cs b/.Source/GTweak/Utilities/Controls/RunGuard.cssimilarity index 97%rename from .Source/GTweak/Utilities/Controls/BlockRunTweaker.csrename to .Source/GTweak/Utilities/Controls/RunGuard.csindex eef5203c..2bc3add2 100644--- a/.Source/GTweak/Utilities/Controls/BlockRunTweaker.cs+++ b/.Source/GTweak/Utilities/Controls/RunGuard.cs@@ -10,7 +10,7 @@ using System.Windows;namespace GTweak.Utilities.Controls{- internal static class BlockRunTweaker+ internal static class RunGuard{[DllImport("user32.dll")]private static extern bool ShowWindow(IntPtr handle, int cmdShow);diff --git a/.Source/GTweak/Utilities/Controls/SettingsRepository.cs b/.Source/GTweak/Utilities/Controls/SettingsEngine.cssimilarity index 74%rename from .Source/GTweak/Utilities/Controls/SettingsRepository.csrename to .Source/GTweak/Utilities/Controls/SettingsEngine.csindex 873929b6..af5ae26b 100644--- a/.Source/GTweak/Utilities/Controls/SettingsRepository.cs+++ b/.Source/GTweak/Utilities/Controls/SettingsEngine.cs@@ -1,6 +1,6 @@using GTweak.Utilities.Configuration;using GTweak.Utilities.Helpers;-using GTweak.Utilities.Helpers.Managers;+using GTweak.Utilities.Managers;using GTweak.Windows;using Microsoft.Win32;using Ookii.Dialogs.Wpf;@@ -13,19 +13,7 @@ using System.Runtime.InteropServices;namespace GTweak.Utilities.Controls{- internal struct StoragePaths- {- internal static string Config = string.Empty;- internal static string FolderLocation => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "GTweak");- internal static string SystemDisk => Path.GetPathRoot(Environment.GetFolderPath(Environment.SpecialFolder.System));- internal static string HostsFile => Path.Combine(Environment.SystemDirectory, @"drivers\etc\hosts");- internal static string PowFile => Path.Combine(FolderLocation, "UltimatePerformance.pow");- internal static string IconBlank => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "Blank.ico");- internal static string LogFile => Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "GTweak_Error.log");- internal static string RegistryLocation => @"HKEY_CURRENT_USER\Software\GTweak";- }-- internal sealed class SettingsRepository+ internal sealed class SettingsEngine{[DllImport("winmm.dll")]internal static extern int waveOutSetVolume(IntPtr hwo, uint dwVolume);@@ -71,20 +59,20 @@ namespace GTweak.Utilities.Controls};_cachedSettings[key] = value;- RegistryHelp.Write(Registry.CurrentUser, @"Software\GTweak", key, regValue, kind);+ RegistryHelp.Write(Registry.CurrentUser, PathLocator.Registry.SubKey, key, regValue, kind);}internal static void СheckingParameters(){foreach (var kv in _defaultSettings){- if (RegistryHelp.ValueExists(StoragePaths.RegistryLocation, kv.Key))+ if (RegistryHelp.ValueExists(PathLocator.Registry.BaseKey, kv.Key))ChangingParameters(kv.Key, kv.Value);else{- _cachedSettings[kv.Key] = kv.Value is bool defaultBool ? RegistryHelp.GetValue(StoragePaths.RegistryLocation, kv.Key, defaultBool ? 1 : 0) is int asBool ? asBool != 0 : defaultBool :- kv.Value is int defaultInt ? RegistryHelp.GetValue(StoragePaths.RegistryLocation, kv.Key, defaultInt) :- kv.Value is string defaultString ? RegistryHelp.GetValue(StoragePaths.RegistryLocation, kv.Key, defaultString) : kv.Value;+ _cachedSettings[kv.Key] = kv.Value is bool defaultBool ? RegistryHelp.GetValue(PathLocator.Registry.BaseKey, kv.Key, defaultBool ? 1 : 0) is int asBool ? asBool != 0 : defaultBool :+ kv.Value is int defaultInt ? RegistryHelp.GetValue(PathLocator.Registry.BaseKey, kv.Key, defaultInt) :+ kv.Value is string defaultString ? RegistryHelp.GetValue(PathLocator.Registry.BaseKey, kv.Key, defaultString) : kv.Value;}}@@ -110,12 +98,12 @@ namespace GTweak.Utilities.Controlstry{- StoragePaths.Config = Path.Combine(Path.GetDirectoryName(vistaSaveFileDialog.FileName), Path.GetFileNameWithoutExtension(vistaSaveFileDialog.FileName) + ".ini");+ PathLocator.Files.Config = Path.Combine(Path.GetDirectoryName(vistaSaveFileDialog.FileName), Path.GetFileNameWithoutExtension(vistaSaveFileDialog.FileName) + ".ini");- if (File.Exists(StoragePaths.Config))- File.Delete(StoragePaths.Config);+ if (File.Exists(PathLocator.Files.Config))+ File.Delete(PathLocator.Files.Config);- INIManager iniManager = new INIManager(StoragePaths.Config);+ INIManager iniManager = new INIManager(PathLocator.Files.Config);iniManager.Write("GTweak", "Author", "Greedeks");iniManager.Write("GTweak", "Release", currentRelease);iniManager.WriteAll(INIManager.SectionConf, INIManager.TempTweaksConf);@@ -138,12 +126,12 @@ namespace GTweak.Utilities.Controlsif (vistaOpenFileDialog.ShowDialog() == false)return;- StoragePaths.Config = vistaOpenFileDialog.FileName;- INIManager iniManager = new INIManager(StoragePaths.Config);+ PathLocator.Files.Config = vistaOpenFileDialog.FileName;+ INIManager iniManager = new INIManager(PathLocator.Files.Config);if (iniManager.GetKeysOrValue("GTweak", false).Contains("Greedeks") && iniManager.GetKeysOrValue("GTweak").Contains("Release")){- if (File.ReadLines(StoragePaths.Config).Any(line => line.Contains("TglButton")) || File.ReadLines(StoragePaths.Config).Any(line => line.Contains("Slider")))+ if (File.ReadLines(PathLocator.Files.Config).Any(line => line.Contains("TglButton")) || File.ReadLines(PathLocator.Files.Config).Any(line => line.Contains("Slider")))new ImportWindow(Path.GetFileName(vistaOpenFileDialog.FileName)).ShowDialog();elsenew NotificationManager().Show("", "info", "empty_import_notification");@@ -156,12 +144,12 @@ namespace GTweak.Utilities.Controls{try{- RegistryHelp.DeleteFolderTree(Registry.CurrentUser, @"Software\GTweak");+ RegistryHelp.DeleteFolderTree(Registry.CurrentUser, PathLocator.Registry.SubKey);RegistryHelp.DeleteFolderTree(Registry.LocalMachine, @"SOFTWARE\Microsoft\Tracing\GTweak_RASAPI32");RegistryHelp.DeleteFolderTree(Registry.LocalMachine, @"SOFTWARE\Microsoft\Tracing\GTweak_RASMANCS");CommandExecutor.RunCommand($"/c taskkill /f /im \"{currentName}\" & choice /c y /n /d y /t 3 & del \"{currentLocation}\" & " +- @$"rd /s /q ""{StoragePaths.FolderLocation}"" & rd /s /q ""{Environment.SystemDirectory}\config\systemprofile\AppData\Local\GTweak""");+ @$"rd /s /q ""{PathLocator.Folders.Workspace}"" & rd /s /q ""{Environment.SystemDirectory}\config\systemprofile\AppData\Local\GTweak""");}catch (Exception ex) { ErrorLogging.LogDebug(ex); }}diff --git a/.Source/GTweak/Utilities/Helpers/BackgroundQueue.cs b/.Source/GTweak/Utilities/Helpers/BackgroundQueue.csindex 5f99b396..43545c0d 100644--- a/.Source/GTweak/Utilities/Helpers/BackgroundQueue.cs+++ b/.Source/GTweak/Utilities/Helpers/BackgroundQueue.cs@@ -12,10 +12,7 @@ namespace GTweak.Utilities.Helpers{lock (_key){- _previousTask = _previousTask.ContinueWith(t => action()- , CancellationToken.None- , TaskContinuationOptions.None- , TaskScheduler.Default);+ _previousTask = _previousTask.ContinueWith(t => action(), CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);return _previousTask;}}@@ -24,10 +21,7 @@ namespace GTweak.Utilities.Helpers{lock (_key){- var task = _previousTask.ContinueWith(t => func()- , CancellationToken.None- , TaskContinuationOptions.None- , TaskScheduler.Default);+ var task = _previousTask.ContinueWith(t => func(), CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);_previousTask = task;return task;}@@ -37,10 +31,7 @@ namespace GTweak.Utilities.Helpers{lock (_key){- _previousTask = _previousTask.ContinueWith(t => action(),- CancellationToken.None,- TaskContinuationOptions.None,- TaskScheduler.Default);+ _previousTask = _previousTask.ContinueWith(t => action(), CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);return _previousTask;}}diff --git a/.Source/GTweak/Utilities/Helpers/TrustedInstaller.cs b/.Source/GTweak/Utilities/Helpers/TrustedInstaller.csindex c8c62891..65f7d422 100644--- a/.Source/GTweak/Utilities/Helpers/TrustedInstaller.cs+++ b/.Source/GTweak/Utilities/Helpers/TrustedInstaller.cs@@ -216,7 +216,7 @@ namespace GTweak.Utilities.Helpers{CloseServiceHandle(hService);CloseServiceHandle(hSCManager);- SettingsRepository.PID = (int)statusBuffer.dwProcessId;+ SettingsEngine.PID = (int)statusBuffer.dwProcessId;return;}}diff --git a/.Source/GTweak/Utilities/Helpers/Managers/ArchiveManager.cs b/.Source/GTweak/Utilities/Managers/ArchiveManager.cssimilarity index 94%rename from .Source/GTweak/Utilities/Helpers/Managers/ArchiveManager.csrename to .Source/GTweak/Utilities/Managers/ArchiveManager.csindex e17587b3..b3e2c3fa 100644--- a/.Source/GTweak/Utilities/Helpers/Managers/ArchiveManager.cs+++ b/.Source/GTweak/Utilities/Managers/ArchiveManager.cs@@ -2,7 +2,7 @@using System.IO;using System.IO.Compression;-namespace GTweak.Utilities.Helpers.Managers+namespace GTweak.Utilities.Managers{internal static class ArchiveManager{diff --git a/.Source/GTweak/Utilities/Helpers/Managers/ExplorerManager.cs b/.Source/GTweak/Utilities/Managers/ExplorerManager.cssimilarity index 98%rename from .Source/GTweak/Utilities/Helpers/Managers/ExplorerManager.csrename to .Source/GTweak/Utilities/Managers/ExplorerManager.csindex dac4ce0c..9db26471 100644--- a/.Source/GTweak/Utilities/Helpers/Managers/ExplorerManager.cs+++ b/.Source/GTweak/Utilities/Managers/ExplorerManager.cs@@ -5,7 +5,7 @@ using System.Diagnostics;using System.Linq;using System.Threading.Tasks;-namespace GTweak.Utilities.Helpers.Managers+namespace GTweak.Utilities.Managers{internal class ExplorerManager{diff --git a/.Source/GTweak/Utilities/Helpers/Managers/INIManager.cs b/.Source/GTweak/Utilities/Managers/INIManager.cssimilarity index 98%rename from .Source/GTweak/Utilities/Helpers/Managers/INIManager.csrename to .Source/GTweak/Utilities/Managers/INIManager.csindex e0907927..cac6bffe 100644--- a/.Source/GTweak/Utilities/Helpers/Managers/INIManager.cs+++ b/.Source/GTweak/Utilities/Managers/INIManager.cs@@ -4,7 +4,7 @@ using System.IO;using System.Runtime.InteropServices;using System.Text;-namespace GTweak.Utilities.Helpers.Managers+namespace GTweak.Utilities.Managers{internal sealed class INIManager{diff --git a/.Source/GTweak/Utilities/Helpers/Managers/NotificationManager.cs b/.Source/GTweak/Utilities/Managers/NotificationManager.cssimilarity index 96%rename from .Source/GTweak/Utilities/Helpers/Managers/NotificationManager.csrename to .Source/GTweak/Utilities/Managers/NotificationManager.csindex 8c50ee01..2f799f8d 100644--- a/.Source/GTweak/Utilities/Helpers/Managers/NotificationManager.cs+++ b/.Source/GTweak/Utilities/Managers/NotificationManager.cs@@ -6,7 +6,7 @@ using System.Threading;using System.Threading.Tasks;using System.Windows;-namespace GTweak.Utilities.Helpers.Managers+namespace GTweak.Utilities.Managers{internal sealed class NotificationManager{@@ -51,7 +51,7 @@ namespace GTweak.Utilities.Helpers.Managersinternal async void Show(string action, string titleKey = "", string textKey = ""){- if (SettingsRepository.IsViewNotification && Interlocked.CompareExchange(ref _isNotificationOpen, 1, 0) == 0)+ if (SettingsEngine.IsViewNotification && Interlocked.CompareExchange(ref _isNotificationOpen, 1, 0) == 0){await Application.Current.Dispatcher.InvokeAsync(async () =>{diff --git a/.Source/GTweak/Utilities/Helpers/Managers/TaskSchedulerManager.cs b/.Source/GTweak/Utilities/Managers/TaskSchedulerManager.cssimilarity index 95%rename from .Source/GTweak/Utilities/Helpers/Managers/TaskSchedulerManager.csrename to .Source/GTweak/Utilities/Managers/TaskSchedulerManager.csindex 861f4bae..fb05138a 100644--- a/.Source/GTweak/Utilities/Helpers/Managers/TaskSchedulerManager.cs+++ b/.Source/GTweak/Utilities/Managers/TaskSchedulerManager.cs@@ -1,9 +1,10 @@using GTweak.Utilities.Controls;-using GTweak.Utilities.Helpers.Storage;+using GTweak.Utilities.Helpers;+using GTweak.Utilities.Storage;using System.Linq;using System.Threading.Tasks;-namespace GTweak.Utilities.Helpers.Managers+namespace GTweak.Utilities.Managers{internal class TaskSchedulerManager : TaskStorage{@@ -50,7 +51,7 @@ namespace GTweak.Utilities.Helpers.Managerscommand += $"schtasks /change {(state ? "/enable" : "/disable")} /tn \"{task}\" & ";command = command.TrimEnd(' ', '&');- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, command);+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, command);});}diff --git a/.Source/GTweak/Utilities/Helpers/Storage/TaskStorage.cs b/.Source/GTweak/Utilities/Storage/TaskStorage.cssimilarity index 96%rename from .Source/GTweak/Utilities/Helpers/Storage/TaskStorage.csrename to .Source/GTweak/Utilities/Storage/TaskStorage.csindex d771d9d9..e3911e31 100644--- a/.Source/GTweak/Utilities/Helpers/Storage/TaskStorage.cs+++ b/.Source/GTweak/Utilities/Storage/TaskStorage.cs@@ -1,4 +1,4 @@-namespace GTweak.Utilities.Helpers.Storage+namespace GTweak.Utilities.Storage{internal class TaskStorage{@@ -41,7 +41,7 @@@"\Microsoft\Windows\UpdateOrchestrator\StartOobeAppsScan_LicenseAccepted",@"\Microsoft\Windows\UpdateOrchestrator\USO_UxBroker",@"\Microsoft\Windows\UpdateOrchestrator\UUS Failover Task",- @"\Microsoft\Windows\WindowsUpdate\Refresh Group Policy Cache",+ @"\Microsoft\Windows\WindowsUpdate\Refresh Group Policy Workspace",@"\Microsoft\Windows\WindowsUpdate\Scheduled Start" };protected static readonly string[] memoryDiagTasks = {@@ -60,7 +60,7 @@protected static readonly string[] WinDefenderTasks = {@"\Microsoft\Windows\ExploitGuard\ExploitGuard MDM policy Refresh",- @"\Microsoft\Windows\Windows Defender\Windows Defender Cache Maintenance",+ @"\Microsoft\Windows\Windows Defender\Windows Defender Workspace Maintenance",@"\Microsoft\Windows\Windows Defender\Windows Defender Cleanup",@"\Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan",@"\Microsoft\Windows\Windows Defender\Windows Defender Verification", };diff --git a/.Source/GTweak/Utilities/Helpers/Storage/WinKeyStorage.cs b/.Source/GTweak/Utilities/Storage/WinKeyStorage.cssimilarity index 98%rename from .Source/GTweak/Utilities/Helpers/Storage/WinKeyStorage.csrename to .Source/GTweak/Utilities/Storage/WinKeyStorage.csindex 2a82819f..65efa098 100644--- a/.Source/GTweak/Utilities/Helpers/Storage/WinKeyStorage.cs+++ b/.Source/GTweak/Utilities/Storage/WinKeyStorage.cs@@ -1,6 +1,6 @@using System.Collections.Generic;-namespace GTweak.Utilities.Helpers.Storage+namespace GTweak.Utilities.Storage{internal class WinKeyStorage{diff --git a/.Source/GTweak/Utilities/Tweaks/ClearingMemory.cs b/.Source/GTweak/Utilities/Tweaks/ClearingMemory.csindex ca865f76..f214a9bb 100644--- a/.Source/GTweak/Utilities/Tweaks/ClearingMemory.cs+++ b/.Source/GTweak/Utilities/Tweaks/ClearingMemory.cs@@ -1,6 +1,6 @@using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers;-using GTweak.Utilities.Helpers.Managers;+using GTweak.Utilities.Managers;using System;using System.Collections.Generic;using System.ComponentModel;@@ -50,7 +50,7 @@ namespace GTweak.Utilities.Tweaksinternal class ClearingMemory{- internal static bool IsWinOldExists => Directory.Exists(Path.Combine(StoragePaths.SystemDisk, "Windows.old"));+ internal static bool IsWinOldExists => Directory.Exists(Path.Combine(PathLocator.Folders.SystemDrive, "Windows.old"));private const int SE_PRIVILEGE_ENABLED = 2;private const string SE_INCREASE_QUOTA_NAME = "SeIncreaseQuotaPrivilege";@@ -185,24 +185,24 @@ namespace GTweak.Utilities.Tweaksif (shouldRemoveWinOld){- string filePath = Path.Combine(StoragePaths.SystemDisk, "Windows.old");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"сmd.exe /c takeown /f \"{filePath}\"");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c icacls \"{filePath}\" /inheritance:r /remove S-1-5-32-544 S-1-5-11 S-1-5-32-545 S-1-5-18");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c icacls \"{filePath}\" /grant %username%:F");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c rd /s /q \"{filePath}\"");+ string filePath = Path.Combine(PathLocator.Folders.SystemDrive, "Windows.old");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"сmd.exe /c takeown /f \"{filePath}\"");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c icacls \"{filePath}\" /inheritance:r /remove S-1-5-32-544 S-1-5-11 S-1-5-32-545 S-1-5-18");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c icacls \"{filePath}\" /grant %username%:F");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c rd /s /q \"{filePath}\"");}- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, @$"cmd.exe /c rd /s /q {StoragePaths.SystemDisk}Windows\Temp & " +- @$"rd /s /q %localappdata%\Temp & rd /s /q {StoragePaths.SystemDisk}Windows\ff*.tmp & rd /s /q {StoragePaths.SystemDisk}Windows\History\* & " +- $@"rd /s /q {StoragePaths.SystemDisk}Windows\CbsTemp\* & rd /s /q {StoragePaths.SystemDisk}Windows\System32\SleepStudy\* & " +- $@"rd /s /q {StoragePaths.SystemDisk}Users\%USERNAME%\AppData\Local\Microsoft\Windows\INetCache\IE\* & rd /s /q {StoragePaths.SystemDisk}Windows\Downloaded Program Files\* & " +- $@"del /f /q {StoragePaths.SystemDisk}Windows\setupapi.log & rd /s /q {StoragePaths.SystemDisk}Windows\Panther\* & " +- $@"for /D %D in (""{StoragePaths.SystemDisk}ProgramData\Microsoft\Windows\WER\*"") do (del /s /q ""%D\*.*"" & for /D %E in (""%D\*"") do rd /s /q ""%E"") & " +- $@"del /f /q {StoragePaths.SystemDisk}Windows\INF\setupapi.app.log & del /f /q {StoragePaths.SystemDisk}Windows\INF\setupapi.dev.log & del /f /q {StoragePaths.SystemDisk}Windows\INF\setupapi.offline.log");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, @$"cmd.exe /c rd /s /q {PathLocator.Folders.SystemDrive}Windows\Temp & " ++ @$"rd /s /q %localappdata%\Temp & rd /s /q {PathLocator.Folders.SystemDrive}Windows\ff*.tmp & rd /s /q {PathLocator.Folders.SystemDrive}Windows\History\* & " ++ $@"rd /s /q {PathLocator.Folders.SystemDrive}Windows\CbsTemp\* & rd /s /q {PathLocator.Folders.SystemDrive}Windows\System32\SleepStudy\* & " ++ $@"rd /s /q {PathLocator.Folders.SystemDrive}Users\%USERNAME%\AppData\Local\Microsoft\Windows\INetCache\IE\* & rd /s /q {PathLocator.Folders.SystemDrive}Windows\Downloaded Program Files\* & " ++ $@"del /f /q {PathLocator.Folders.SystemDrive}Windows\setupapi.log & rd /s /q {PathLocator.Folders.SystemDrive}Windows\Panther\* & " ++ $@"for /D %D in (""{PathLocator.Folders.SystemDrive}ProgramData\Microsoft\Windows\WER\*"") do (del /s /q ""%D\*.*"" & for /D %E in (""%D\*"") do rd /s /q ""%E"") & " ++ $@"del /f /q {PathLocator.Folders.SystemDrive}Windows\INF\setupapi.app.log & del /f /q {PathLocator.Folders.SystemDrive}Windows\INF\setupapi.dev.log & del /f /q {PathLocator.Folders.SystemDrive}Windows\INF\setupapi.offline.log");ExplorerManager.Restart(new Process(), async () =>{- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, @"cmd.exe /c attrib -h -r -s %localappdata%\IconCache.db & del /a /q %localappdata%\IconCache.db & " ++ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, @"cmd.exe /c attrib -h -r -s %localappdata%\IconCache.db & del /a /q %localappdata%\IconCache.db & " +@"del /a /f /q %localappdata%\Microsoft\Windows\Explorer\iconcache* & del /a /f /q %localappdata%\Microsoft\Windows\Explorer\thumbcache* & " +@"del /a /f /q %localappdata%\Microsoft\Windows\Explorer\thumbcache_*.db & del /a /f /q %localappdata%\Microsoft\Windows\Explorer\thumbcache_exif.db & " +@"del /a /f /q %localappdata%\Microsoft\Windows\Explorer\thumbcache_idx.db & del /a /f /q %localappdata%\Microsoft\Windows\Explorer\thumbcache_sr.db & " +diff --git a/.Source/GTweak/Utilities/Tweaks/ConfidentialityTweaks.cs b/.Source/GTweak/Utilities/Tweaks/ConfidentialityTweaks.csindex 0bc29394..bcacdae4 100644--- a/.Source/GTweak/Utilities/Tweaks/ConfidentialityTweaks.cs+++ b/.Source/GTweak/Utilities/Tweaks/ConfidentialityTweaks.cs@@ -2,7 +2,7 @@using GTweak.Utilities.Configuration;using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers;-using GTweak.Utilities.Helpers.Managers;+using GTweak.Utilities.Managers;using GTweak.View;using Microsoft.Win32;using System;@@ -92,7 +92,7 @@ namespace GTweak.Utilities.Tweaks{try{- int numberRows = File.ReadAllText(StoragePaths.HostsFile).Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries).Count(line => line.StartsWith("0.0.0.0"));+ int numberRows = File.ReadAllText(PathLocator.Files.Hosts).Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries).Count(line => line.StartsWith("0.0.0.0"));return numberRows < 673;}catch { return false; }@@ -184,7 +184,7 @@ namespace GTweak.Utilities.TweaksBlockSpyDomain(isDisabled);Task.Run(delegate{- string backupFile = StoragePaths.HostsFile + @" (Default GTweak)";+ string backupFile = PathLocator.Files.Hosts + @" (Default GTweak)";try{if (isDisabled)@@ -192,17 +192,17 @@ namespace GTweak.Utilities.Tweaksif (File.Exists(backupFile))File.Delete(backupFile);- File.Move(StoragePaths.HostsFile, backupFile);- ArchiveManager.Unarchive(StoragePaths.HostsFile, Resources.hosts);+ File.Move(PathLocator.Files.Hosts, backupFile);+ ArchiveManager.Unarchive(PathLocator.Files.Hosts, Resources.hosts);}else{- File.Copy(backupFile, StoragePaths.HostsFile, true);+ File.Copy(backupFile, PathLocator.Files.Hosts, true);if (File.Exists(backupFile))File.Delete(backupFile);else- File.WriteAllText(StoragePaths.HostsFile, string.Empty);+ File.WriteAllText(PathLocator.Files.Hosts, string.Empty);}}catch (Exception ex) { ErrorLogging.LogDebug(ex); }@@ -332,7 +332,7 @@ namespace GTweak.Utilities.Tweaks}break;case "TglButton16":- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $@"cmd.exe /c reg add HKLM\SYSTEM\CurrentControlSet\Services\diagnosticshub.standardcollector.service /t REG_DWORD /v Start /d {(isDisabled ? "4" : "3")} /f");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $@"cmd.exe /c reg add HKLM\SYSTEM\CurrentControlSet\Services\diagnosticshub.standardcollector.service /t REG_DWORD /v Start /d {(isDisabled ? "4" : "3")} /f");RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\diagnosticshub.standardcollector.service", "Start", isDisabled ? 4 : 3, RegistryValueKind.DWord, true);break;case "TglButton17":diff --git a/.Source/GTweak/Utilities/Tweaks/DefenderManager/BackupRights.cs b/.Source/GTweak/Utilities/Tweaks/DefenderManager/BackupRights.csindex c9bd1a61..f46befe4 100644--- a/.Source/GTweak/Utilities/Tweaks/DefenderManager/BackupRights.cs+++ b/.Source/GTweak/Utilities/Tweaks/DefenderManager/BackupRights.cs@@ -1,5 +1,5 @@using GTweak.Utilities.Controls;-using GTweak.Utilities.Helpers.Managers;+using GTweak.Utilities.Managers;using Microsoft.Win32;using Newtonsoft.Json;using System;@@ -11,7 +11,7 @@ namespace GTweak.Utilities.Tweaks.DefenderManager{internal class BackupRights : TaskSchedulerManager{- private static readonly string _folderBackupPath = Path.Combine(StoragePaths.SystemDisk, @"Windows\System32\Config\WDBackup_GTweak");+ private static readonly string _folderBackupPath = Path.Combine(PathLocator.Folders.SystemDrive, @"Windows\System32\Config\WDBackup_GTweak");private static readonly string _jsonFilePath = Path.Combine(_folderBackupPath, "BackupData.json");private static readonly string _aclFilePath = Path.Combine(_folderBackupPath, "BackupRights.acl");diff --git a/.Source/GTweak/Utilities/Tweaks/DefenderManager/WindowsDefender.cs b/.Source/GTweak/Utilities/Tweaks/DefenderManager/WindowsDefender.csindex 39a96e45..c7b96a60 100644--- a/.Source/GTweak/Utilities/Tweaks/DefenderManager/WindowsDefender.cs+++ b/.Source/GTweak/Utilities/Tweaks/DefenderManager/WindowsDefender.cs@@ -13,7 +13,7 @@ namespace GTweak.Utilities.Tweaks.DefenderManager{internal static void Activate(){- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, "cmd.exe /c reg delete HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\AppHost /v EnableWebContentEvaluation /f & " ++ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, "cmd.exe /c reg delete HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\AppHost /v EnableWebContentEvaluation /f & " +"reg delete HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer /v SmartScreenEnabled /f & " +"reg delete HKLM\\SOFTWARE\\Policies\\Microsoft\\MicrosoftEdge\\PhishingFilter /v EnabledV9 /f & " +"reg delete HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\System /v EnableSmartScreen /f & " +@@ -135,19 +135,19 @@ namespace GTweak.Utilities.Tweaks.DefenderManagerforeach (var (filePath, originalFileName) in new (string filePath, string originalFileName)[]{- (Path.Combine(StoragePaths.SystemDisk, "Windows", "System32", "BlockSS.exe"), "smartscreen.exe"),- (Path.Combine(StoragePaths.SystemDisk, "Program Files", "Windows Defender", "BlockAntimalware.exe"), "MsMpEng.exe"),- (Path.Combine(StoragePaths.SystemDisk, "Program Files", "Windows Defender", "BlockAntimalwareCore.exe"), "MpDefenderCoreService.exe")+ (Path.Combine(PathLocator.Folders.SystemDrive, "Windows", "System32", "BlockSS.exe"), "smartscreen.exe"),+ (Path.Combine(PathLocator.Folders.SystemDrive, "Program Files", "Windows Defender", "BlockAntimalware.exe"), "MsMpEng.exe"),+ (Path.Combine(PathLocator.Folders.SystemDrive, "Program Files", "Windows Defender", "BlockAntimalwareCore.exe"), "MpDefenderCoreService.exe")}){string newFilePath = Path.Combine(Path.GetDirectoryName(filePath), originalFileName);- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c rename \"{filePath}\" {originalFileName}");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c icacls \"{newFilePath}\" /reset");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c takeown /f \"{newFilePath}\" /a");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c icacls \"{newFilePath}\" /setowner *S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c rename \"{filePath}\" {originalFileName}");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c icacls \"{newFilePath}\" /reset");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c takeown /f \"{newFilePath}\" /a");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c icacls \"{newFilePath}\" /setowner *S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464");}- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c for /d %D in (\"{Path.Combine(StoragePaths.SystemDisk, @"ProgramData\Microsoft\Windows Defender\Platform\*")}\") do if exist \"%D\\BlockAntimalware.exe\" ren \"%D\\BlockAntimalware.exe\" MsMpEng.exe");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c for /d %D in (\"{Path.Combine(StoragePaths.SystemDisk, @"ProgramData\Microsoft\Windows Defender\Platform\*")}\") do if exist \"%D\\BlockAntimalwareCore.exe\" ren \"%D\\BlockAntimalwareCore.exe\" MpDefenderCoreService.exe");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c for /d %D in (\"{Path.Combine(PathLocator.Folders.SystemDrive, @"ProgramData\Microsoft\Windows Defender\Platform\*")}\") do if exist \"%D\\BlockAntimalware.exe\" ren \"%D\\BlockAntimalware.exe\" MsMpEng.exe");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c for /d %D in (\"{Path.Combine(PathLocator.Folders.SystemDrive, @"ProgramData\Microsoft\Windows Defender\Platform\*")}\") do if exist \"%D\\BlockAntimalwareCore.exe\" ren \"%D\\BlockAntimalwareCore.exe\" MpDefenderCoreService.exe");SetTaskState(true, WinDefenderTasks);RunPowerShellCommand(@"Get-AppXpackage Microsoft.WindowsDefender | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register ""$($_.InstallLocation)\AppXManifest.xml""}");@@ -155,7 +155,7 @@ namespace GTweak.Utilities.Tweaks.DefenderManagerRegistryHelp.Write(Registry.ClassesRoot, @"*\shellex\ContextMenuHandlers\EPP", "", "{09A47860-11B0-4DA5-AFA5-26D86198A780}", RegistryValueKind.String);RegistryHelp.Write(Registry.ClassesRoot, @"Directory\shellex\ContextMenuHandlers\EPP", "", "{09A47860-11B0-4DA5-AFA5-26D86198A780}", RegistryValueKind.String);RegistryHelp.Write(Registry.ClassesRoot, @"Drive\shellex\ContextMenuHandlers\EPP", "", "{09A47860-11B0-4DA5-AFA5-26D86198A780}", RegistryValueKind.String);- RegistryHelp.Write(Registry.ClassesRoot, @"CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}\InprocServer32", "", StoragePaths.SystemDisk + @"Program Files\Windows Defender\shellext.dll", RegistryValueKind.String);+ RegistryHelp.Write(Registry.ClassesRoot, @"CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}\InprocServer32", "", PathLocator.Folders.SystemDrive + @"Program Files\Windows Defender\shellext.dll", RegistryValueKind.String);RegistryHelp.Write(Registry.ClassesRoot, @"CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}\InprocServer32", "ThreadingModel", "Apartment", RegistryValueKind.String);ImportRights();@@ -169,23 +169,23 @@ namespace GTweak.Utilities.Tweaks.DefenderManagerforeach (var (filePath, newFileName) in new (string filePath, string newFileName)[]{- (Path.Combine(StoragePaths.SystemDisk, "Windows", "System32", "smartscreen.exe"), "BlockSS.exe"),- (Path.Combine(StoragePaths.SystemDisk, "Program Files", "Windows Defender", "MsMpEng.exe"), "BlockAntimalware.exe"),- (Path.Combine(StoragePaths.SystemDisk, "Program Files", "Windows Defender", "MpDefenderCoreService.exe"), "BlockAntimalwareCore.exe")+ (Path.Combine(PathLocator.Folders.SystemDrive, "Windows", "System32", "smartscreen.exe"), "BlockSS.exe"),+ (Path.Combine(PathLocator.Folders.SystemDrive, "Program Files", "Windows Defender", "MsMpEng.exe"), "BlockAntimalware.exe"),+ (Path.Combine(PathLocator.Folders.SystemDrive, "Program Files", "Windows Defender", "MpDefenderCoreService.exe"), "BlockAntimalwareCore.exe")}){- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"сmd.exe /c takeown /f \"{filePath}\"");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c icacls \"{filePath}\" /inheritance:r /remove S-1-5-32-544 S-1-5-11 S-1-5-32-545 S-1-5-18");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c icacls \"{filePath}\" /grant %username%:F");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c rename \"{filePath}\" {newFileName}");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"сmd.exe /c takeown /f \"{filePath}\"");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c icacls \"{filePath}\" /inheritance:r /remove S-1-5-32-544 S-1-5-11 S-1-5-32-545 S-1-5-18");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c icacls \"{filePath}\" /grant %username%:F");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c rename \"{filePath}\" {newFileName}");}- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c for /d %D in (\"{Path.Combine(StoragePaths.SystemDisk, @"ProgramData\Microsoft\Windows Defender\Platform\*")}\") do if exist \"%D\\MsMpEng.exe\" ren \"%D\\MsMpEng.exe\" BlockAntimalware.exe");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c for /d %D in (\"{Path.Combine(StoragePaths.SystemDisk, @"ProgramData\Microsoft\Windows Defender\Platform\*")}\") do if exist \"%D\\MpDefenderCoreService.exe\" ren \"%D\\MpDefenderCoreService.exe\" BlockAntimalwareCore.exe");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c for /d %D in (\"{Path.Combine(PathLocator.Folders.SystemDrive, @"ProgramData\Microsoft\Windows Defender\Platform\*")}\") do if exist \"%D\\MsMpEng.exe\" ren \"%D\\MsMpEng.exe\" BlockAntimalware.exe");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c for /d %D in (\"{Path.Combine(PathLocator.Folders.SystemDrive, @"ProgramData\Microsoft\Windows Defender\Platform\*")}\") do if exist \"%D\\MpDefenderCoreService.exe\" ren \"%D\\MpDefenderCoreService.exe\" BlockAntimalwareCore.exe");RegistryHelp.Write(Registry.LocalMachine, @"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer", "SmartScreenEnabled", "Off", RegistryValueKind.String);RegistryHelp.Write(Registry.LocalMachine, @"SOFTWARE\Policies\Microsoft\Windows\System", "EnableSmartScreen", 0, RegistryValueKind.DWord);- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, "cmd.exe /c reg add HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer /t REG_SZ /v SmartScreenEnabled /d \"off\" /f");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, "cmd.exe /c reg add HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer /t REG_SZ /v SmartScreenEnabled /d \"off\" /f");RunPowerShellCommand("Set-MpPreference -DisableIOAVProtection $true");RunPowerShellCommand("Set-MpPreference -DisableRealtimeMonitoring $true");@@ -304,7 +304,7 @@ namespace GTweak.Utilities.Tweaks.DefenderManagerKillProcess(new[] { "SecurityHealthService", "SecurityHealthSystray" });- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, "cmd.exe /c taskkill /f /im MsMpEng.exe & reg add HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\AppHost /t REG_DWORD /v EnableWebContentEvaluation /d 0 /f & " ++ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, "cmd.exe /c taskkill /f /im MsMpEng.exe & reg add HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\AppHost /t REG_DWORD /v EnableWebContentEvaluation /d 0 /f & " +"reg add HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer /t REG_SZ /v SmartScreenEnabled /d \"off\" /f & " +"reg add HKLM\\SOFTWARE\\Policies\\Microsoft\\MicrosoftEdge\\PhishingFilter /t REG_DWORD /v EnabledV9 /d 0 /f & " +"reg add HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\System /t REG_DWORD /v EnableSmartScreen /d 0 /f & " +@@ -365,9 +365,9 @@ namespace GTweak.Utilities.Tweaks.DefenderManagerforeach (var directory in new[]{- Path.Combine(StoragePaths.SystemDisk, "ProgramData", "Microsoft", "Windows Defender", "Scans", "History"),- Path.Combine(StoragePaths.SystemDisk, "ProgramData", "Microsoft", "Windows Defender", "Scans", "Cache"),- Path.Combine(StoragePaths.SystemDisk, "ProgramData", "Microsoft", "Windows Defender", "Support")+ Path.Combine(PathLocator.Folders.SystemDrive, "ProgramData", "Microsoft", "Windows Defender", "Scans", "History"),+ Path.Combine(PathLocator.Folders.SystemDrive, "ProgramData", "Microsoft", "Windows Defender", "Scans", "Workspace"),+ Path.Combine(PathLocator.Folders.SystemDrive, "ProgramData", "Microsoft", "Windows Defender", "Support")}){try@@ -376,7 +376,7 @@ namespace GTweak.Utilities.Tweaks.DefenderManagercontinue;foreach (var filePath in Directory.EnumerateFiles(directory, "*", SearchOption.TopDirectoryOnly))- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c takeown /f \"{filePath}\" & icacls \"{filePath}\" /inheritance:r /remove S-1-5-32-544 S-1-5-11 S-1-5-32-545 S-1-5-18 & icacls \"{filePath}\" /grant %username%:F & del /q \"{filePath}\"");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c takeown /f \"{filePath}\" & icacls \"{filePath}\" /inheritance:r /remove S-1-5-32-544 S-1-5-11 S-1-5-32-545 S-1-5-18 & icacls \"{filePath}\" /grant %username%:F & del /q \"{filePath}\"");}catch (Exception ex) { ErrorLogging.LogDebug(ex); }}@@ -406,10 +406,10 @@ namespace GTweak.Utilities.Tweaks.DefenderManagerforeach (var service in services){- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $@"cmd.exe /c reg add ""HKLM\SYSTEM\CurrentControlSet\Services\{service.Key}"" /t REG_DWORD /v Start /d {(isDisable ? service.Value.off : service.Value.on)} /f");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $@"cmd.exe /c reg add ""HKLM\SYSTEM\CurrentControlSet\Services\{service.Key}"" /t REG_DWORD /v Start /d {(isDisable ? service.Value.off : service.Value.on)} /f");if (service.Key == "WinDefend")- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $@"cmd.exe /c reg add ""HKLM\SYSTEM\CurrentControlSet\Services\{service.Key}"" /t REG_DWORD /v AutorunsDisabled /d {(isDisable ? 3 : 0)} /f");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $@"cmd.exe /c reg add ""HKLM\SYSTEM\CurrentControlSet\Services\{service.Key}"" /t REG_DWORD /v AutorunsDisabled /d {(isDisable ? 3 : 0)} /f");if (isDisable)RunPowerShellCommand($"Stop-Service -Name {service.Key}; Set-Service -Name {service.Key} -StartupType Disabled");@@ -419,7 +419,7 @@ namespace GTweak.Utilities.Tweaks.DefenderManagerRunCmdCommand($"sc config {service.Key} start= {(isDisable ? "disabled" : "auto")}");}- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"{Path.Combine(Environment.SystemDirectory, "WindowsPowerShell\\v1.0\\powershell.exe")} -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Unrestricted -Command \"Set-ItemProperty -Path HKLM:\\SOFTWARE\\Microsoft\\Windows Defender\\Features -Name TamperProtection -Value 0x0000000{(isDisable ? 0 : 1)}\"");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"{Path.Combine(Environment.SystemDirectory, "WindowsPowerShell\\v1.0\\powershell.exe")} -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Unrestricted -Command \"Set-ItemProperty -Path HKLM:\\SOFTWARE\\Microsoft\\Windows Defender\\Features -Name TamperProtection -Value 0x0000000{(isDisable ? 0 : 1)}\"");}private static void KillProcess(params string[] nameList)diff --git a/.Source/GTweak/Utilities/Tweaks/Firewall.cs b/.Source/GTweak/Utilities/Tweaks/Firewall.csindex a9968eae..24a30b7a 100644--- a/.Source/GTweak/Utilities/Tweaks/Firewall.cs+++ b/.Source/GTweak/Utilities/Tweaks/Firewall.cs@@ -1,5 +1,5 @@using GTweak.Utilities.Controls;-using GTweak.Utilities.Helpers.Managers;+using GTweak.Utilities.Managers;using NetFwTypeLib;using System;using System.Collections.Generic;@@ -19,10 +19,10 @@ namespace GTweak.Utilities.Tweaksprivate static readonly SortedList<string, string> _сollectExecutablePaths = new SortedList<string, string>{- ["MoUso"] = File.Exists($@"{StoragePaths.SystemDisk}Windows\UUS\amd64\MoUsoCoreWorker.exe")- ? $@"{StoragePaths.SystemDisk}Windows\UUS\amd64\MoUsoCoreWorker.exe" : $@"{StoragePaths.SystemDisk}Windows\System32\MoUsoCoreWorker.exe",- ["Uso"] = string.Concat(StoragePaths.SystemDisk, @"Windows\System32\usoclient.exe"),- ["WD"] = string.Concat(StoragePaths.SystemDisk, @"Program Files\Windows Defender\MpCmdRun.exe"),+ ["MoUso"] = File.Exists($@"{PathLocator.Folders.SystemDrive}Windows\UUS\amd64\MoUsoCoreWorker.exe")+ ? $@"{PathLocator.Folders.SystemDrive}Windows\UUS\amd64\MoUsoCoreWorker.exe" : $@"{PathLocator.Folders.SystemDrive}Windows\System32\MoUsoCoreWorker.exe",+ ["Uso"] = string.Concat(PathLocator.Folders.SystemDrive, @"Windows\System32\usoclient.exe"),+ ["WD"] = string.Concat(PathLocator.Folders.SystemDrive, @"Program Files\Windows Defender\MpCmdRun.exe"),};private static void RemoveAllRulesByName(string nameRule)diff --git a/.Source/GTweak/Utilities/Tweaks/InterfaceTweaks.cs b/.Source/GTweak/Utilities/Tweaks/InterfaceTweaks.csindex 251e17f4..ce35582a 100644--- a/.Source/GTweak/Utilities/Tweaks/InterfaceTweaks.cs+++ b/.Source/GTweak/Utilities/Tweaks/InterfaceTweaks.cs@@ -1,7 +1,7 @@using GTweak.Utilities.Configuration;using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers;-using GTweak.Utilities.Helpers.Managers;+using GTweak.Utilities.Managers;using GTweak.View;using Microsoft.Win32;using System;@@ -223,12 +223,12 @@ namespace GTweak.Utilities.Tweaks{if (isDisabled){- ArchiveManager.Unarchive(StoragePaths.IconBlank, Properties.Resources.Blank);+ ArchiveManager.Unarchive(PathLocator.Files.BlankIcon, Properties.Resources.Blank);RegistryHelp.Write(Registry.LocalMachine, @"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons", "29", @"%systemroot%\\Blank.ico,0", RegistryValueKind.String);}else{- File.Delete(StoragePaths.IconBlank);+ File.Delete(PathLocator.Files.BlankIcon);RegistryHelp.DeleteFolderTree(Registry.LocalMachine, @"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons");}});@@ -316,7 +316,7 @@ namespace GTweak.Utilities.Tweaksif (SystemDiagnostics.IsWindowsVersion[11]){- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, @"cmd.exe /c del /q /f ""%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*Copilot*.lnk""");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, @"cmd.exe /c del /q /f ""%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*Copilot*.lnk""");RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowCopilotButton", isDisabled ? 0 : 1, RegistryValueKind.DWord);RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarDa", isDisabled ? 0 : 1, RegistryValueKind.DWord);RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarMn", isDisabled ? 0 : 1, RegistryValueKind.DWord);diff --git a/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.cs b/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.csindex d7ec6347..283d6fee 100644--- a/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.cs+++ b/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.cs@@ -1,6 +1,6 @@using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers;-using GTweak.Utilities.Helpers.Managers;+using GTweak.Utilities.Managers;using GTweak.View;using Microsoft.Win32;using System;@@ -27,7 +27,7 @@ namespace GTweak.Utilities.Tweaksprivate static string FilesPathUpdate(string program, bool isOldWay = false){bool isUsoClient = _updateFilesWin.TryGetValue("Uso", out var usoFiles) && Regex.IsMatch(program, $"{usoFiles.Default}|{usoFiles.Blocked}", RegexOptions.IgnoreCase);- string basePath = (isOldWay || isUsoClient) ? Path.Combine(StoragePaths.SystemDisk, "Windows", "System32") : Path.Combine(StoragePaths.SystemDisk, "Windows", "UUS", "amd64");+ string basePath = (isOldWay || isUsoClient) ? Path.Combine(PathLocator.Folders.SystemDrive, "Windows", "System32") : Path.Combine(PathLocator.Folders.SystemDrive, "Windows", "UUS", "amd64");return Path.Combine(basePath, program);}@@ -215,7 +215,7 @@ namespace GTweak.Utilities.TweaksTask.Run(delegate{string value = isDisabled ? "4" : "3";- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $@"cmd.exe /c reg add HKLM\SYSTEM\CurrentControlSet\Services\WalletService /t REG_DWORD /v Start /d {value} /f & " ++ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $@"cmd.exe /c reg add HKLM\SYSTEM\CurrentControlSet\Services\WalletService /t REG_DWORD /v Start /d {value} /f & " +$@"reg add HKLM\SYSTEM\CurrentControlSet\Services\VacSvc /t REG_DWORD /v Start /d {value} /f & " +$@"reg add HKLM\SYSTEM\CurrentControlSet\Services\spectrum /t REG_DWORD /v Start /d {value} /f & " +$@"reg add HKLM\SYSTEM\CurrentControlSet\Services\SharedRealitySvc /t REG_DWORD /v Start /d {value} /f & " +@@ -252,7 +252,7 @@ namespace GTweak.Utilities.TweaksRegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\McpManagementService", "Start", isDisabled ? 4 : 3, RegistryValueKind.DWord);if (isDisabled)- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, @$"cmd.exe /c net stop spooler && del /F /Q %systemroot%\System32\spool\PRINTERS\*.*");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, @$"cmd.exe /c net stop spooler && del /F /Q %systemroot%\System32\spool\PRINTERS\*.*");try{@@ -336,9 +336,9 @@ namespace GTweak.Utilities.Tweakstry{if (isDisabled)- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /k takeown /f \"{currentFilePath}\" & icacls \"{currentFilePath}\" /inheritance:r /remove S-1-5-32-544 S-1-5-11 S-1-5-32-545 S-1-5-18 & icacls \"{currentFilePath}\" /grant %username%:F & rename \"{currentFilePath}\" \"{targetFileName}\"");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /k takeown /f \"{currentFilePath}\" & icacls \"{currentFilePath}\" /inheritance:r /remove S-1-5-32-544 S-1-5-11 S-1-5-32-545 S-1-5-18 & icacls \"{currentFilePath}\" /grant %username%:F & rename \"{currentFilePath}\" \"{targetFileName}\"");else- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /k rename \"{currentFilePath}\" \"{targetFileName}\" & icacls \"{targetFilePath}\" /reset & takeown /f \"{targetFilePath}\" /a & icacls \"{targetFilePath}\" /setowner *S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /k rename \"{currentFilePath}\" \"{targetFileName}\" & icacls \"{targetFilePath}\" /reset & takeown /f \"{targetFilePath}\" /a & icacls \"{targetFilePath}\" /setowner *S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464");}catch (Exception ex) { ErrorLogging.LogDebug(ex); }}@@ -456,15 +456,15 @@ namespace GTweak.Utilities.Tweaks}}- foreach (string path in new[] { $@"{StoragePaths.SystemDisk}Windows\SoftwareDistribution\Download", $@"{StoragePaths.SystemDisk}Windows\SoftwareDistribution\DataStore", $@"{StoragePaths.SystemDisk}Windows\System32\catroot2", Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Microsoft", "Windows", "DeliveryOptimization") })+ foreach (string path in new[] { $@"{PathLocator.Folders.SystemDrive}Windows\SoftwareDistribution\Download", $@"{PathLocator.Folders.SystemDrive}Windows\SoftwareDistribution\DataStore", $@"{PathLocator.Folders.SystemDrive}Windows\System32\catroot2", Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Microsoft", "Windows", "DeliveryOptimization") }){if (Directory.Exists(path)){- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"сmd.exe /c takeown /f \"{path}\"");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c icacls \"{path}\" /inheritance:r /remove S-1-5-32-544 S-1-5-11 S-1-5-32-545 S-1-5-18");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c icacls \"{path}\" /grant %username%:F");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c rd /s /q \"{path}\"");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"сmd.exe /c takeown /f \"{path}\"");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c icacls \"{path}\" /inheritance:r /remove S-1-5-32-544 S-1-5-11 S-1-5-32-545 S-1-5-18");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c icacls \"{path}\" /grant %username%:F");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c rd /s /q \"{path}\"");}}diff --git a/.Source/GTweak/Utilities/Tweaks/SystemMaintenance.cs b/.Source/GTweak/Utilities/Tweaks/SystemMaintenance.csindex af17a3c2..ee27f6d3 100644--- a/.Source/GTweak/Utilities/Tweaks/SystemMaintenance.cs+++ b/.Source/GTweak/Utilities/Tweaks/SystemMaintenance.cs@@ -1,6 +1,6 @@using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers;-using GTweak.Utilities.Helpers.Managers;+using GTweak.Utilities.Managers;using Microsoft.Win32;using System;using System.Management;@@ -117,7 +117,7 @@ namespace GTweak.Utilities.Tweaksforeach (var managementObj in new ManagementObjectSearcher(@"\\localhost\root\default", "SELECT SequenceNumber FROM SystemRestore", new EnumerationOptions { ReturnImmediately = true }).Get())SRRemoveRestorePoint(Convert.ToInt32(managementObj["SequenceNumber"].ToString()));- DisableSR(StoragePaths.SystemDisk + @"\\");+ DisableSR(PathLocator.Folders.SystemDrive + @"\\");}elsenew NotificationManager().Show("", "info", "warn_recovery_notification");diff --git a/.Source/GTweak/Utilities/Tweaks/SystemTweaks.cs b/.Source/GTweak/Utilities/Tweaks/SystemTweaks.csindex 4ea7b175..dcd4f123 100644--- a/.Source/GTweak/Utilities/Tweaks/SystemTweaks.cs+++ b/.Source/GTweak/Utilities/Tweaks/SystemTweaks.cs@@ -1,6 +1,6 @@using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers;-using GTweak.Utilities.Helpers.Managers;+using GTweak.Utilities.Managers;using GTweak.Utilities.Tweaks.DefenderManager;using GTweak.View;using GTweak.Windows;@@ -93,7 +93,7 @@ namespace GTweak.Utilities.Tweakscatch (Exception ex) { ErrorLogging.LogDebug(ex); }if (!isTweakWorkingAntivirus)- systemV.TglButton8.StateNA = File.Exists(Path.Combine(StoragePaths.SystemDisk, @"Windows\System32\smartscreen.exe"));+ systemV.TglButton8.StateNA = File.Exists(Path.Combine(PathLocator.Folders.SystemDrive, @"Windows\System32\smartscreen.exe"));systemV.TglButton9.StateNA =RegistryHelp.CheckValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "PromptOnSecureDesktop", "0") ||@@ -455,13 +455,13 @@ namespace GTweak.Utilities.Tweaksif (string.IsNullOrEmpty(searchScheme)){- ArchiveManager.Unarchive(StoragePaths.PowFile, Properties.Resources.UltPower);+ ArchiveManager.Unarchive(PathLocator.Files.PowPlan, Properties.Resources.UltPower);string _guid = Guid.NewGuid().ToString("D");using (_powercfg){- _powercfg.StartInfo.Arguments = $@"-import ""{StoragePaths.PowFile}"" {_guid}";+ _powercfg.StartInfo.Arguments = $@"-import ""{PathLocator.Files.PowPlan}"" {_guid}";_powercfg.Start();await Task.Delay(5);@@ -473,7 +473,7 @@ namespace GTweak.Utilities.Tweaks_powercfg.Start();}- CommandExecutor.RunCommand($"/c timeout /t 10 && rd /s /q \"{StoragePaths.FolderLocation}\"");+ CommandExecutor.RunCommand($"/c timeout /t 10 && rd /s /q \"{PathLocator.Folders.Workspace}\"");}}elsediff --git a/.Source/GTweak/Utilities/Tweaks/UninstallingPakages.cs b/.Source/GTweak/Utilities/Tweaks/UninstallingPakages.csindex 06ce3168..7caf62ec 100644--- a/.Source/GTweak/Utilities/Tweaks/UninstallingPakages.cs+++ b/.Source/GTweak/Utilities/Tweaks/UninstallingPakages.cs@@ -1,6 +1,6 @@using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers;-using GTweak.Utilities.Helpers.Managers;+using GTweak.Utilities.Managers;using Microsoft.Win32;using System;using System.Collections.Generic;@@ -14,7 +14,7 @@ namespace GTweak.Utilities.Tweaks{internal static bool IsOneDriveInstalled => File.Exists(Environment.ExpandEnvironmentVariables(@"%userprofile%\AppData\Local\Microsoft\OneDrive\OneDrive.exe"));private static bool _isLocalAccount = false;- private static readonly string _pathPackage = Path.Combine(StoragePaths.SystemDisk, "Program Files", "WindowsApps");+ private static readonly string _pathPackage = Path.Combine(PathLocator.Folders.SystemDrive, "Program Files", "WindowsApps");internal void LoadInstalledPackages() => InstalledPackages = RegistryHelp.GetSubKeyNames<HashSet<string>>(Registry.CurrentUser, @"Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages");internal static HashSet<string> InstalledPackages = new HashSet<string>();@@ -109,7 +109,7 @@ namespace GTweak.Utilities.TweaksRegistryHelp.DeleteFolderTree(Registry.ClassesRoot, @"Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}");CommandExecutor.RunCommand($@"/c rd /s /q %userprofile%\AppData\Local\Microsoft\OneDrive & rd /s /q %userprofile%\AppData\Local\OneDrive &- rd /s /q ""%allusersprofile%\Microsoft OneDrive"" & rd /s /q {StoragePaths.SystemDisk}OneDriveTemp{(_isLocalAccount ? @" & rd /s /q %userprofile%\OneDrive" : "")}");+ rd /s /q ""%allusersprofile%\Microsoft OneDrive"" & rd /s /q {PathLocator.Folders.SystemDrive}OneDriveTemp{(_isLocalAccount ? @" & rd /s /q %userprofile%\OneDrive" : "")}");});}@@ -135,7 +135,7 @@ namespace GTweak.Utilities.Tweaksawait CommandExecutor.InvokeRunCommand(string.Join(" ; ", psCommands), true).ConfigureAwait(false);- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $@"cmd.exe /c for /d %i in ({string.Join(" ", packageNamesToRemove.Select(n => $@"""{_pathPackage}\*{n}*"""))}) do takeown /f ""%i"" /r /d Y & icacls ""%i"" /inheritance:r /remove S-1-5-32-544 S-1-5-11 S-1-5-32-545 S-1-5-18 & icacls ""%i"" /grant %username%:F & rd /s /q ""%i""");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $@"cmd.exe /c for /d %i in ({string.Join(" ", packageNamesToRemove.Select(n => $@"""{_pathPackage}\*{n}*"""))}) do takeown /f ""%i"" /r /d Y & icacls ""%i"" /inheritance:r /remove S-1-5-32-544 S-1-5-11 S-1-5-32-545 S-1-5-18 & icacls ""%i"" /grant %username%:F & rd /s /q ""%i""");}catch (Exception ex) { ErrorLogging.LogDebug(ex); }@@ -169,7 +169,7 @@ namespace GTweak.Utilities.TweaksRegistryHelp.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");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.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@@ -202,17 +202,17 @@ namespace GTweak.Utilities.Tweakscase "Edge":TakingOwnership.GrantDebugPrivilege();foreach (string process in new string[] { "msedge.exe", "edgeupdate.exe", "edgeupdatem.exe", "msedgewebview2.exe", "MicrosoftEdgeUpdate.exe", "msedgewebviewhost.exe", "msedgeuserbroker.exe", "usocoreworker.exe", "RuntimeBroker.exe" })- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c taskkill /f /im {process} /t");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c taskkill /f /im {process} /t");DeletingTask(edgeTasks);- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, @"cmd.exe /с rmdir /s /q %LocalAppData%\Microsoft\Edge");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, @"cmd.exe /c for /r ""%AppData%\Microsoft\Internet Explorer\Quick Launch"" %f in (*Edge*) do del ""%f""");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, @"cmd.exe /c del /q /f ""%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*Edge*.lnk""");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $@"cmd.exe /c for /r ""{StoragePaths.SystemDisk}ProgramData\Microsoft\Windows\Start Menu\Programs"" %f in (*Edge*) do del ""%f""");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $@"cmd.exe /c for /r ""{StoragePaths.SystemDisk}Users"" %f in (*Edge*) do @if exist ""%f"" del /f /q ""%f""");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $@"cmd.exe /c for /d %d in (""{StoragePaths.SystemDisk}Program Files (x86)\Microsoft\*Edge*"") do rmdir /s /q ""%d""");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $@"cmd.exe /c for /f ""delims="" %i in ('dir /b /s ""{StoragePaths.SystemDisk}Windows\System32\Tasks\*Edge*""') do (if exist ""%i"" (if exist ""%i\"" (rmdir /s /q ""%i"") else (del /f /q ""%i"")))");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, @"cmd.exe /с rmdir /s /q %LocalAppData%\Microsoft\Edge");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, @"cmd.exe /c for /r ""%AppData%\Microsoft\Internet Explorer\Quick Launch"" %f in (*Edge*) do del ""%f""");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, @"cmd.exe /c del /q /f ""%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*Edge*.lnk""");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $@"cmd.exe /c for /r ""{PathLocator.Folders.SystemDrive}ProgramData\Microsoft\Windows\Start Menu\Programs"" %f in (*Edge*) do del ""%f""");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $@"cmd.exe /c for /r ""{PathLocator.Folders.SystemDrive}Users"" %f in (*Edge*) do @if exist ""%f"" del /f /q ""%f""");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $@"cmd.exe /c for /d %d in (""{PathLocator.Folders.SystemDrive}Program Files (x86)\Microsoft\*Edge*"") do rmdir /s /q ""%d""");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $@"cmd.exe /c for /f ""delims="" %i in ('dir /b /s ""{PathLocator.Folders.SystemDrive}Windows\System32\Tasks\*Edge*""') do (if exist ""%i"" (if exist ""%i\"" (rmdir /s /q ""%i"") else (del /f /q ""%i"")))");RegistryHelp.DeleteFolderTree(Registry.LocalMachine, @"SOFTWARE\Policies\Microsoft\Edge", true);RegistryHelp.DeleteFolderTree(Registry.LocalMachine, @"SOFTWARE\Microsoft\Active Setup\Installed Components\{9459C573-B17A-45AE-9F64-1857B5D58CEE}", true);@@ -239,10 +239,10 @@ namespace GTweak.Utilities.Tweaksstatic void RemoveDirectory(string path){- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c takeown /f \"{path}\"");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c icacls \"{path}\" /inheritance:r /remove S-1-5-32-544 S-1-5-11 S-1-5-32-545 S-1-5-18");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c icacls \"{path}\" /grant %username%:F");- TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsRepository.PID, $"cmd.exe /c rd /s /q \"{path}\"");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c takeown /f \"{path}\"");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c icacls \"{path}\" /inheritance:r /remove S-1-5-32-544 S-1-5-11 S-1-5-32-545 S-1-5-18");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c icacls \"{path}\" /grant %username%:F");+ TrustedInstaller.CreateProcessAsTrustedInstaller(SettingsEngine.PID, $"cmd.exe /c rd /s /q \"{path}\"");}foreach (string folder in new[] { "Edge", "EdgeCore", "EdgeUpdate", "Temp", "EdgeWebView" })diff --git a/.Source/GTweak/Utilities/Tweaks/WindowsLicense.cs b/.Source/GTweak/Utilities/Tweaks/WindowsLicense.csindex fb7fcb68..751ad966 100644--- a/.Source/GTweak/Utilities/Tweaks/WindowsLicense.cs+++ b/.Source/GTweak/Utilities/Tweaks/WindowsLicense.cs@@ -1,8 +1,8 @@using GTweak.Utilities.Configuration;using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers;-using GTweak.Utilities.Helpers.Managers;-using GTweak.Utilities.Helpers.Storage;+using GTweak.Utilities.Managers;+using GTweak.Utilities.Storage;using GTweak.Windows;using Microsoft.Win32;using System;@@ -54,7 +54,7 @@ namespace GTweak.Utilities.Tweaksawait CommandExecutor.InvokeRunCommand($"/c slmgr.vbs //b /ipk {keyWinHWID}");- CommandExecutor.RunCommand($@"/c del /f /q {StoragePaths.SystemDisk}ProgramData\Microsoft\Windows\ClipSVC\GenuineTicket\*.xml & del /f /q {StoragePaths.SystemDisk}ProgramData\Microsoft\Windows\ClipSVC\Install\Migration\*.xml");+ CommandExecutor.RunCommand($@"/c del /f /q {PathLocator.Folders.SystemDrive}ProgramData\Microsoft\Windows\ClipSVC\GenuineTicket\*.xml & del /f /q {PathLocator.Folders.SystemDrive}ProgramData\Microsoft\Windows\ClipSVC\Install\Migration\*.xml");string originalGeo = RegistryHelp.GetValue(@"HKEY_CURRENT_USER\Control Panel\International\Geo", "Name", CultureInfo.InstalledUICulture.Name.Split('-')[1].ToUpperInvariant());RegistryHelp.Write(Registry.CurrentUser, @"Control Panel\International\Geo", "Name", "US", RegistryValueKind.String);@@ -67,7 +67,7 @@ namespace GTweak.Utilities.TweaksXElement foundTicket = xmlDoc.Descendants("Ticket").FirstOrDefault(t => t.Element("product") != null && t.Element("product").Value.IndexOf(RegistryHelp.GetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions", "OSProductPfn", string.Empty), StringComparison.OrdinalIgnoreCase) >= 0);foundTicket ??= xmlDoc.Descendants("Ticket").FirstOrDefault(t => t.Element("product") != null && t.Element("product").Value == "KMS");XDocument genuineXml = XDocument.Parse(foundTicket.Element("content")?.Value.Trim());- genuineXml.Save(Path.Combine(StoragePaths.SystemDisk, "ProgramData", "Microsoft", "Windows", "ClipSVC", "GenuineTicket", "GenuineTicket.xml"));+ genuineXml.Save(Path.Combine(PathLocator.Folders.SystemDrive, "ProgramData", "Microsoft", "Windows", "ClipSVC", "GenuineTicket", "GenuineTicket.xml"));await Task.Delay(3000);await CommandExecutor.InvokeRunCommand("clipup -v -o", true);diff --git a/.Source/GTweak/View/ConfidentialityView.xaml.cs b/.Source/GTweak/View/ConfidentialityView.xaml.csindex b4e5dcbd..350e2395 100644--- a/.Source/GTweak/View/ConfidentialityView.xaml.cs+++ b/.Source/GTweak/View/ConfidentialityView.xaml.cs@@ -1,5 +1,5 @@using GTweak.Assets.UserControl;-using GTweak.Utilities.Helpers.Managers;+using GTweak.Utilities.Managers;using GTweak.Utilities.Tweaks;using System;using System.Threading.Tasks;diff --git a/.Source/GTweak/View/DataSystemView.xaml.cs b/.Source/GTweak/View/DataSystemView.xaml.csindex 273f8f19..3ed00329 100644--- a/.Source/GTweak/View/DataSystemView.xaml.cs+++ b/.Source/GTweak/View/DataSystemView.xaml.cs@@ -1,8 +1,8 @@using GTweak.Core.ViewModel;+using GTweak.Utilities.Animation;using GTweak.Utilities.Configuration;using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers;-using GTweak.Utilities.Helpers.Animation;using System;using System.Collections.Generic;using System.Windows;@@ -59,7 +59,7 @@ namespace GTweak.Viewif (BtnHiddenIP.IsChecked.Value & BtnHiddenIP.Visibility == Visibility.Hidden & !SystemDiagnostics.isIPAddressFormatValid){DoubleAnimation doubleAnim = new DoubleAnimation(0, (Duration)TimeSpan.FromSeconds(0.18));- doubleAnim.Completed += delegate { SettingsRepository.IsHiddenIpAddress = false; };+ doubleAnim.Completed += delegate { SettingsEngine.IsHiddenIpAddress = false; };Timeline.SetDesiredFrameRate(doubleAnim, 240);IpAddress.Effect.BeginAnimation(BlurEffect.RadiusProperty, doubleAnim);}@@ -122,7 +122,7 @@ namespace GTweak.Viewprivate void BtnHiddenIP_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e){- SettingsRepository.IsHiddenIpAddress = !BtnHiddenIP.IsChecked.Value;+ SettingsEngine.IsHiddenIpAddress = !BtnHiddenIP.IsChecked.Value;DoubleAnimation doubleAnim = new DoubleAnimation(){diff --git a/.Source/GTweak/View/InterfaceView.xaml.cs b/.Source/GTweak/View/InterfaceView.xaml.csindex 35be0c1a..e66c57c8 100644--- a/.Source/GTweak/View/InterfaceView.xaml.cs+++ b/.Source/GTweak/View/InterfaceView.xaml.cs@@ -1,7 +1,7 @@using GTweak.Assets.UserControl;+using GTweak.Utilities.Animation;using GTweak.Utilities.Configuration;-using GTweak.Utilities.Helpers.Animation;-using GTweak.Utilities.Helpers.Managers;+using GTweak.Utilities.Managers;using GTweak.Utilities.Tweaks;using System;using System.Diagnostics;diff --git a/.Source/GTweak/View/MoreView.xaml.cs b/.Source/GTweak/View/MoreView.xaml.csindex eec4b2b1..aaf2f2ac 100644--- a/.Source/GTweak/View/MoreView.xaml.cs+++ b/.Source/GTweak/View/MoreView.xaml.cs@@ -1,8 +1,8 @@-using GTweak.Utilities.Configuration;+using GTweak.Utilities.Animation;+using GTweak.Utilities.Configuration;using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers;-using GTweak.Utilities.Helpers.Animation;-using GTweak.Utilities.Helpers.Managers;+using GTweak.Utilities.Managers;using GTweak.Utilities.Tweaks;using GTweak.Windows;using Ookii.Dialogs.Wpf;diff --git a/.Source/GTweak/View/PakagesView.xaml.cs b/.Source/GTweak/View/PakagesView.xaml.csindex 67d1a101..5f3314ee 100644--- a/.Source/GTweak/View/PakagesView.xaml.cs+++ b/.Source/GTweak/View/PakagesView.xaml.cs@@ -1,7 +1,7 @@-using GTweak.Utilities.Controls;+using GTweak.Utilities.Animation;+using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers;-using GTweak.Utilities.Helpers.Animation;-using GTweak.Utilities.Helpers.Managers;+using GTweak.Utilities.Managers;using GTweak.Utilities.Tweaks;using System;using System.Collections.Generic;diff --git a/.Source/GTweak/View/ServicesView.xaml.cs b/.Source/GTweak/View/ServicesView.xaml.csindex ae9c81bf..c9f53dc9 100644--- a/.Source/GTweak/View/ServicesView.xaml.cs+++ b/.Source/GTweak/View/ServicesView.xaml.cs@@ -1,5 +1,5 @@using GTweak.Assets.UserControl;-using GTweak.Utilities.Helpers.Managers;+using GTweak.Utilities.Managers;using GTweak.Utilities.Tweaks;using System;using System.Threading.Tasks;diff --git a/.Source/GTweak/View/SystemView.xaml.cs b/.Source/GTweak/View/SystemView.xaml.csindex 539cb6bd..3b4c0e64 100644--- a/.Source/GTweak/View/SystemView.xaml.cs+++ b/.Source/GTweak/View/SystemView.xaml.cs@@ -1,5 +1,5 @@using GTweak.Assets.UserControl;-using GTweak.Utilities.Helpers.Managers;+using GTweak.Utilities.Managers;using GTweak.Utilities.Tweaks;using System;using System.Threading.Tasks;diff --git a/.Source/GTweak/Windows/ImportWindow.xaml.cs b/.Source/GTweak/Windows/ImportWindow.xaml.csindex c460accd..0b33355a 100644--- a/.Source/GTweak/Windows/ImportWindow.xaml.cs+++ b/.Source/GTweak/Windows/ImportWindow.xaml.cs@@ -1,7 +1,7 @@-using GTweak.Utilities.Controls;+using GTweak.Utilities.Animation;+using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers;-using GTweak.Utilities.Helpers.Animation;-using GTweak.Utilities.Helpers.Managers;+using GTweak.Utilities.Managers;using GTweak.Utilities.Tweaks;using GTweak.Utilities.Tweaks.DefenderManager;using System;@@ -59,7 +59,7 @@ namespace GTweak.Windowsprivate async Task ApplyTweaksWithProgress(CancellationToken token, IProgress<byte> progress){- INIManager iniManager = new INIManager(StoragePaths.Config);+ INIManager iniManager = new INIManager(PathLocator.Files.Config);var allSections = new (string Section, Action<string, bool> TweakAction, IEnumerable<KeyValuePair<string, string>> NotificationActions, IEnumerable<KeyValuePair<string, bool>> ExplorerMapping)[]{diff --git a/.Source/GTweak/Windows/LoadingWindow.xaml.cs b/.Source/GTweak/Windows/LoadingWindow.xaml.csindex 9dda40fb..51f7d4bf 100644--- a/.Source/GTweak/Windows/LoadingWindow.xaml.cs+++ b/.Source/GTweak/Windows/LoadingWindow.xaml.cs@@ -1,7 +1,7 @@-using GTweak.Utilities.Configuration;+using GTweak.Utilities.Animation;+using GTweak.Utilities.Configuration;using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers;-using GTweak.Utilities.Helpers.Animation;using GTweak.Utilities.Tweaks;using System;using System.ComponentModel;diff --git a/.Source/GTweak/Windows/MainWindow.xaml.cs b/.Source/GTweak/Windows/MainWindow.xaml.csindex ae2fd930..4f1c8c60 100644--- a/.Source/GTweak/Windows/MainWindow.xaml.cs+++ b/.Source/GTweak/Windows/MainWindow.xaml.cs@@ -1,6 +1,6 @@-using GTweak.Utilities.Configuration;+using GTweak.Utilities.Animation;+using GTweak.Utilities.Configuration;using GTweak.Utilities.Controls;-using GTweak.Utilities.Helpers.Animation;using GTweak.Windows;using System;using System.ComponentModel;@@ -20,13 +20,13 @@ namespace GTweak{InitializeComponent();- BtnNotification.StateNA = SettingsRepository.IsViewNotification;- BtnUpdate.StateNA = SettingsRepository.IsUpdateCheckRequired;- BtnTopMost.StateNA = Topmost = SettingsRepository.IsTopMost;- BtnSoundNtn.IsChecked = SettingsRepository.IsPlayingSound;- SliderVolume.Value = SettingsRepository.Volume;- LanguageSelectionMenu.SelectedIndex = GetSelectedIndex(SettingsRepository.Language, "en", SettingsRepository.AvailableLangs);- ThemeSelectionMenu.SelectedIndex = GetSelectedIndex(SettingsRepository.Theme, "Dark", SettingsRepository.AvailableThemes);+ BtnNotification.StateNA = SettingsEngine.IsViewNotification;+ BtnUpdate.StateNA = SettingsEngine.IsUpdateCheckRequired;+ BtnTopMost.StateNA = Topmost = SettingsEngine.IsTopMost;+ BtnSoundNtn.IsChecked = SettingsEngine.IsPlayingSound;+ SliderVolume.Value = SettingsEngine.Volume;+ LanguageSelectionMenu.SelectedIndex = GetSelectedIndex(SettingsEngine.Language, "en", SettingsEngine.AvailableLangs);+ ThemeSelectionMenu.SelectedIndex = GetSelectedIndex(SettingsEngine.Theme, "Dark", SettingsEngine.AvailableThemes);App.ImportTweaksUpdate += delegate { BtnMore.IsChecked = true; };App.ThemeChanged += delegate { Close(); new RebootWindow().ShowDialog(); };@@ -111,7 +111,7 @@ namespace GTweakBeginAnimation(OpacityProperty, FadeAnimation.FadeIn(1, 0.3,async () =>{- if (SystemDiagnostics.IsNeedUpdate && SettingsRepository.IsUpdateCheckRequired)+ if (SystemDiagnostics.IsNeedUpdate && SettingsEngine.IsUpdateCheckRequired){await Task.Delay(500);new UpdateWindow().ShowDialog();@@ -122,44 +122,44 @@ namespace GTweak#endregion#region Settings Menu- private void BtnNotification_ChangedState(object sender, EventArgs e) => SettingsRepository.IsViewNotification = !BtnNotification.State;+ private void BtnNotification_ChangedState(object sender, EventArgs e) => SettingsEngine.IsViewNotification = !BtnNotification.State;- private void BtnUpdate_ChangedState(object sender, EventArgs e) => SettingsRepository.IsUpdateCheckRequired = !BtnUpdate.State;+ private void BtnUpdate_ChangedState(object sender, EventArgs e) => SettingsEngine.IsUpdateCheckRequired = !BtnUpdate.State;private void BtnTopMost_ChangedState(object sender, EventArgs e){- SettingsRepository.IsTopMost = !BtnTopMost.State;+ SettingsEngine.IsTopMost = !BtnTopMost.State;Topmost = !BtnTopMost.State;}- private void BtnSoundNtn_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) => SettingsRepository.IsPlayingSound = (bool)!BtnSoundNtn.IsChecked;+ private void BtnSoundNtn_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) => SettingsEngine.IsPlayingSound = (bool)!BtnSoundNtn.IsChecked;private void SliderVolume_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e){SliderVolume.Value = SliderVolume.Value == 0 ? 1 : SliderVolume.Value;- SettingsRepository.Volume = (int)SliderVolume.Value;- SettingsRepository.waveOutSetVolume(IntPtr.Zero, ((uint)(double)(ushort.MaxValue / 100 * SliderVolume.Value) & 0x0000ffff) | ((uint)(double)(ushort.MaxValue / 100 * SliderVolume.Value) << 16));+ SettingsEngine.Volume = (int)SliderVolume.Value;+ SettingsEngine.waveOutSetVolume(IntPtr.Zero, ((uint)(double)(ushort.MaxValue / 100 * SliderVolume.Value) & 0x0000ffff) | ((uint)(double)(ushort.MaxValue / 100 * SliderVolume.Value) << 16));}private void LanguageSelectionMenu_SelectionChanged(object sender, SelectionChangedEventArgs e){- string selectedLang = SettingsRepository.AvailableLangs.ElementAtOrDefault(LanguageSelectionMenu.SelectedIndex) ?? SettingsRepository.AvailableLangs.Last();- SettingsRepository.Language = selectedLang;+ string selectedLang = SettingsEngine.AvailableLangs.ElementAtOrDefault(LanguageSelectionMenu.SelectedIndex) ?? SettingsEngine.AvailableLangs.Last();+ SettingsEngine.Language = selectedLang;App.Language = selectedLang;}private void ThemeSelectionMenu_SelectionChanged(object sender, SelectionChangedEventArgs e){- string selectedTheme = SettingsRepository.AvailableThemes.ElementAtOrDefault(ThemeSelectionMenu.SelectedIndex) ?? SettingsRepository.AvailableThemes.Last();- SettingsRepository.Theme = selectedTheme;+ string selectedTheme = SettingsEngine.AvailableThemes.ElementAtOrDefault(ThemeSelectionMenu.SelectedIndex) ?? SettingsEngine.AvailableThemes.Last();+ SettingsEngine.Theme = selectedTheme;App.Theme = selectedTheme;}- private void BtnExport_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) => SettingsRepository.SaveFileConfig();+ private void BtnExport_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) => SettingsEngine.SaveFileConfig();- private void BtnImport_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) => SettingsRepository.OpenFileConfig();+ private void BtnImport_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) => SettingsEngine.OpenFileConfig();- private void BtnDelete_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) => SettingsRepository.SelfRemoval();+ private void BtnDelete_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) => SettingsEngine.SelfRemoval();private void BtnContats_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e){diff --git a/.Source/GTweak/Windows/MessageWindow.xaml.cs b/.Source/GTweak/Windows/MessageWindow.xaml.csindex 5ef3f0aa..9eabc57e 100644--- a/.Source/GTweak/Windows/MessageWindow.xaml.cs+++ b/.Source/GTweak/Windows/MessageWindow.xaml.cs@@ -1,5 +1,5 @@-using GTweak.Utilities.Controls;-using GTweak.Utilities.Helpers.Animation;+using GTweak.Utilities.Animation;+using GTweak.Utilities.Controls;using System;using System.ComponentModel;using System.Text.RegularExpressions;diff --git a/.Source/GTweak/Windows/NotificationWindow.xaml.cs b/.Source/GTweak/Windows/NotificationWindow.xaml.csindex ce6b2ad3..58354694 100644--- a/.Source/GTweak/Windows/NotificationWindow.xaml.cs+++ b/.Source/GTweak/Windows/NotificationWindow.xaml.cs@@ -1,6 +1,6 @@-using GTweak.Utilities.Controls;+using GTweak.Utilities.Animation;+using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers;-using GTweak.Utilities.Helpers.Animation;using System;using System.ComponentModel;using System.Media;@@ -55,7 +55,7 @@ namespace GTweak.Windowsprivate void Window_Loaded(object sender, RoutedEventArgs e){- if (SettingsRepository.IsPlayingSound)+ if (SettingsEngine.IsPlayingSound){using SoundPlayer notificationSound = new SoundPlayer(Properties.Resources.Sound);notificationSound.Play();diff --git a/.Source/GTweak/Windows/RebootWindow.xaml.cs b/.Source/GTweak/Windows/RebootWindow.xaml.csindex 3272a80a..72dec012 100644--- a/.Source/GTweak/Windows/RebootWindow.xaml.cs+++ b/.Source/GTweak/Windows/RebootWindow.xaml.cs@@ -1,5 +1,5 @@-using GTweak.Utilities.Controls;-using GTweak.Utilities.Helpers.Animation;+using GTweak.Utilities.Animation;+using GTweak.Utilities.Controls;using System.Windows;using System.Windows.Controls;@@ -12,6 +12,6 @@ namespace GTweak.WindowsInitializeComponent();}- private void Window_Loaded(object sender, RoutedEventArgs e) => RestartProgress.BeginAnimation(ProgressBar.ValueProperty, FadeAnimation.FadeIn(100, 1.5, () => { SettingsRepository.SelfReboot(); }));+ private void Window_Loaded(object sender, RoutedEventArgs e) => RestartProgress.BeginAnimation(ProgressBar.ValueProperty, FadeAnimation.FadeIn(100, 1.5, () => { SettingsEngine.SelfReboot(); }));}}diff --git a/.Source/GTweak/Windows/UpdateWindow.xaml.cs b/.Source/GTweak/Windows/UpdateWindow.xaml.csindex 827c57af..d2b50c98 100644--- a/.Source/GTweak/Windows/UpdateWindow.xaml.cs+++ b/.Source/GTweak/Windows/UpdateWindow.xaml.cs@@ -1,8 +1,8 @@-using GTweak.Utilities.Configuration;+using GTweak.Utilities.Animation;+using GTweak.Utilities.Configuration;using GTweak.Utilities.Controls;using GTweak.Utilities.Helpers;-using GTweak.Utilities.Helpers.Animation;-using GTweak.Utilities.Helpers.Managers;+using GTweak.Utilities.Managers;using System;using System.ComponentModel;using System.Diagnostics;@@ -17,7 +17,7 @@ namespace GTweak.Windowspublic UpdateWindow(){InitializeComponent();- CurrentVerison.Text = SettingsRepository.currentRelease;+ CurrentVerison.Text = SettingsEngine.currentRelease;DownloadVersion.Text = NewVerison.Text = SystemDiagnostics.DownloadVersion;}@@ -66,7 +66,7 @@ namespace GTweak.Windows};webClient.DownloadFileCompleted += delegate{- CommandExecutor.RunCommand($"/c taskkill /f /im \"{SettingsRepository.currentName}\" && timeout /t 2 && del \"{SettingsRepository.currentLocation}\" && ren {tempFileName} \"{SettingsRepository.currentName}\" && \"{SettingsRepository.currentLocation}\"");+ CommandExecutor.RunCommand($"/c taskkill /f /im \"{SettingsEngine.currentName}\" && timeout /t 2 && del \"{SettingsEngine.currentLocation}\" && ren {tempFileName} \"{SettingsEngine.currentName}\" && \"{SettingsEngine.currentLocation}\"");};webClient.DownloadFileAsync(new Uri("https://github.com/Greedeks/GTweak/releases/latest/download/GTweak.exe"), tempFileName);}diff --git a/.Source/GTweak/Windows/WaitingWindow.xaml.cs b/.Source/GTweak/Windows/WaitingWindow.xaml.csindex 91a952a4..a1a9a84e 100644--- a/.Source/GTweak/Windows/WaitingWindow.xaml.cs+++ b/.Source/GTweak/Windows/WaitingWindow.xaml.cs@@ -1,5 +1,5 @@-using GTweak.Utilities.Helpers;-using GTweak.Utilities.Helpers.Animation;+using GTweak.Utilities.Animation;+using GTweak.Utilities.Helpers;using System.ComponentModel;using System.Diagnostics;using System.Windows;