Portable Tool for an Ideal Windows Setup
C# activatorbloatware-removalcsharpdebloatdebloaterdisable-servicesmonitoring-systemportableprivacy-toolsregistry-tweakssystem-tuningsystem-utilitytelemetrytweakerwindows-10windows-11windows-debloatwindows-defenderwindows-optimizationwindows-tweaks
add & upd. disable/delete tasks in the Task scheduler for Maps, OneDrive, Windows Update, Bluetooth, Xbox
Greedeks7d0fd1011826
diff --git a/.Source/GTweak/Utilities/Storage/TaskStorage.cs b/.Source/GTweak/Utilities/Storage/TaskStorage.csindex 37892868..df08c54d 100644--- a/.Source/GTweak/Utilities/Storage/TaskStorage.cs+++ b/.Source/GTweak/Utilities/Storage/TaskStorage.cs@@ -16,11 +16,6 @@@"\Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticResolver",@"\Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" };- protected static readonly string[] nvidiaTasks = {- @"\NvTmRepOnLogon_{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8}",- @"\NvTmRep_{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8}",- @"\NvTmMon_{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8}" };-protected static readonly string[] telemetryTasks = {@"\Microsoft\Office\Office ClickToRun Service Monitor",@"\Microsoft\Office\OfficeTelemetry\AgentFallBack2016",@@ -31,25 +26,38 @@@"\Microsoft\Office\OfficeTelemetryAgentLogOn",@"\Microsoft\Office\Office 15 Subscription Heartbeat" };+ protected static readonly string[] nvidiaTasks = {+ @"\NvTmRepOnLogon_{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8}",+ @"\NvTmRep_{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8}",+ @"\NvTmMon_{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8}" };+protected static readonly string[] winUpdatesTasks = {@"\Microsoft\Windows\UpdateOrchestrator\Report policies",+ @"\Microsoft\Windows\UpdateOrchestrator\Schedule Maintenance Work",@"\Microsoft\Windows\UpdateOrchestrator\Schedule Scan",@"\Microsoft\Windows\UpdateOrchestrator\Schedule Scan Static Task",+ @"\Microsoft\Windows\UpdateOrchestrator\Schedule Wake To Work",@"\Microsoft\Windows\UpdateOrchestrator\Schedule Work",@"\Microsoft\Windows\UpdateOrchestrator\Start Oobe Expedite Work",@"\Microsoft\Windows\UpdateOrchestrator\StartOobeAppsScanAfterUpdate",@"\Microsoft\Windows\UpdateOrchestrator\StartOobeAppsScan_LicenseAccepted",+ @"\Microsoft\Windows\UpdateOrchestrator\UIEOrchestrator",@"\Microsoft\Windows\UpdateOrchestrator\USO_UxBroker",@"\Microsoft\Windows\UpdateOrchestrator\UUS Failover Task",@"\Microsoft\Windows\WindowsUpdate\Refresh Group Policy Cache",@"\Microsoft\Windows\WindowsUpdate\Scheduled Start" };- protected static readonly string[] memoryDiagTasks = {- @"\Microsoft\Windows\MemoryDiagnostic\ProcessMemoryDiagnosticEvents",- @"\Microsoft\Windows\MemoryDiagnostic\RunFullMemoryDiagnostic" };+ protected static readonly string[] xboxGameTasks = {+ @"\Microsoft\XblGameSave\XblGameSaveTask",+ @"\Microsoft\XblGameSave\XblGameSaveTaskLogon" };- protected static readonly string restoreTask = @"\Microsoft\Windows\SystemRestore\SR";- protected static readonly string defragTask = @"\Microsoft\Windows\Defrag\ScheduledDefrag";+ protected static readonly string bluetoothTask = @"\Microsoft\Windows\Bluetooth\UninstallDeviceTask";++ protected static readonly string[] mapsTasks = {+ @"\Microsoft\Windows\Maps\MapsToastTask",+ @"\Microsoft\Windows\Maps\MapsUpdateTask" };++ protected static readonly string oneDriveTask = @"\Microsoft\Windows\OneDrive\OneDrive Standalone Update Task";protected static readonly string[] edgeTasks = {@"\MicrosoftEdgeUpdateTaskMachineUA{EA17DF76-AE5F-45F8-8867-FE5E0DD06656}",@@ -58,11 +66,18 @@@"\MicrosoftEdgeUpdateTaskMachineUA*",@"\MicrosoftEdgeUpdateTaskUser*" };- protected static readonly string[] WinDefenderTasks = {+ protected static readonly string[] memoryDiagTasks = {+ @"\Microsoft\Windows\MemoryDiagnostic\ProcessMemoryDiagnosticEvents",+ @"\Microsoft\Windows\MemoryDiagnostic\RunFullMemoryDiagnostic" };++ 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 Cleanup",@"\Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan",@"\Microsoft\Windows\Windows Defender\Windows Defender Verification", };++ protected static readonly string restoreTask = @"\Microsoft\Windows\SystemRestore\SR";+ protected static readonly string defragTask = @"\Microsoft\Windows\Defrag\ScheduledDefrag";}}diff --git a/.Source/GTweak/Utilities/Tweaks/DefenderManager/WindowsDefender.cs b/.Source/GTweak/Utilities/Tweaks/DefenderManager/WindowsDefender.csindex 0668178e..76ca333b 100644--- a/.Source/GTweak/Utilities/Tweaks/DefenderManager/WindowsDefender.cs+++ b/.Source/GTweak/Utilities/Tweaks/DefenderManager/WindowsDefender.cs@@ -157,7 +157,7 @@ namespace GTweak.Utilities.Tweaks.DefenderManagerCommandExecutor.RunCommandAsTrustedInstaller($"/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");CommandExecutor.RunCommandAsTrustedInstaller($"/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);+ SetTaskState(true, winDefenderTasks);RunPowerShellCommand(@"Get-AppXpackage Microsoft.WindowsDefender | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register ""$($_.InstallLocation)\AppXManifest.xml""}");RegistryHelp.Write(Registry.ClassesRoot, @"*\shellex\ContextMenuHandlers\EPP", "", "{09A47860-11B0-4DA5-AFA5-26D86198A780}", RegistryValueKind.String);@@ -304,7 +304,7 @@ namespace GTweak.Utilities.Tweaks.DefenderManagerRegistryHelp.Write(Registry.CurrentUser, @"SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge", "EnabledV9", 0, RegistryValueKind.DWord);RegistryHelp.Write(Registry.CurrentUser, @"SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge", "PreventOverride", 0, RegistryValueKind.DWord);- SetTaskState(false, WinDefenderTasks);+ SetTaskState(false, winDefenderTasks);RegistryHelp.Write(Registry.LocalMachine, @"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run", "SecurityHealth", new byte[] { 0099, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99 }, RegistryValueKind.Binary);RegistryHelp.DeleteValue(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Windows Defender");diff --git a/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.cs b/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.csindex 2d34c384..7cf99e8a 100644--- a/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.cs+++ b/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.cs@@ -202,6 +202,7 @@ namespace GTweak.Utilities.TweaksRegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\XblAuthManager", "Start", isDisabled ? 4 : 3, RegistryValueKind.DWord);RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\XboxNetApiSvc", "Start", isDisabled ? 4 : 3, RegistryValueKind.DWord);RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\XblGameSave", "Start", isDisabled ? 4 : 3, RegistryValueKind.DWord);+ SetTaskState(!isDisabled, xboxGameTasks);break;case "TglButton3":RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\WwanSvc", "Start", isDisabled ? 4 : 3, RegistryValueKind.DWord);@@ -216,7 +217,6 @@ namespace GTweak.Utilities.Tweaks"MapsBroker", "EntAppSvc", "embeddedmode","wlidsvc", "WEPHOSTSVC", "StorSvc", "ClipSVC", "InstallService"};string command = $@"/c {string.Join(" & ", services.Select(s => $@"reg add HKLM\SYSTEM\CurrentControlSet\Services\{s} /t REG_DWORD /v Start /d {(isDisabled ? "4" : "3")} /f"))}";CommandExecutor.RunCommandAsTrustedInstaller(command);-break;case "TglButton5":RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\wmiApSrv", "Start", isDisabled ? 4 : 3, RegistryValueKind.DWord);@@ -231,6 +231,7 @@ namespace GTweak.Utilities.TweaksRegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\bthserv", "Start", isDisabled ? 4 : 3, RegistryValueKind.DWord);RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\BthAvctpSvc", "Start", isDisabled ? 4 : 3, RegistryValueKind.DWord);RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\BTAGService", "Start", isDisabled ? 4 : 3, RegistryValueKind.DWord);+ SetTaskState(!isDisabled, bluetoothTask);break;case "TglButton8":RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\Spooler", "Start", isDisabled ? 4 : 2, RegistryValueKind.DWord);diff --git a/.Source/GTweak/Utilities/Tweaks/UninstallingPakages.cs b/.Source/GTweak/Utilities/Tweaks/UninstallingPakages.csindex 804c34f3..42c9dc20 100644--- a/.Source/GTweak/Utilities/Tweaks/UninstallingPakages.cs+++ b/.Source/GTweak/Utilities/Tweaks/UninstallingPakages.cs@@ -92,6 +92,8 @@ namespace GTweak.Utilities.Tweaks{await CommandExecutor.InvokeRunCommand(@"/c %systemroot%\System32\OneDriveSetup.exe & %systemroot%\SysWOW64\OneDriveSetup.exe").ConfigureAwait(false);+ SetTaskState(true, oneDriveTask);+RegistryHelp.CreateFolder(Registry.ClassesRoot, @"CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}");RegistryHelp.CreateFolder(Registry.ClassesRoot, @"Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}");});@@ -108,6 +110,8 @@ namespace GTweak.Utilities.TweaksRegistryHelp.DeleteFolderTree(Registry.ClassesRoot, @"CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}");RegistryHelp.DeleteFolderTree(Registry.ClassesRoot, @"Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}");+ SetTaskState(false, oneDriveTask);+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 {PathLocator.Folders.SystemDrive}OneDriveTemp{(_isLocalAccount ? @" & rd /s /q %userprofile%\OneDrive" : "")}");});@@ -141,6 +145,9 @@ namespace GTweak.Utilities.Tweaksswitch (packageName){+ case "Maps":+ DeletingTask(mapsTasks);+ break;case "Widgets":RegistryHelp.Write(Registry.LocalMachine, @"SOFTWARE\Policies\Microsoft\Dsh", "AllowNewsAndInterests", 0, RegistryValueKind.DWord);break;