Skip to content

Portable Tool for an Ideal Windows Setup

v 5.0.6 hot fix

Greedeks9c1e809a54d2
diff --git a/.Source/GTweak/Properties/AssemblyInfo.cs b/.Source/GTweak/Properties/AssemblyInfo.cs
index 1c502179..50866297 100644
--- a/.Source/GTweak/Properties/AssemblyInfo.cs
+++ b/.Source/GTweak/Properties/AssemblyInfo.cs
@@ -7,9 +7,9 @@ using System.Windows;
[assembly: AssemblyProduct("GTweak")]
[assembly: AssemblyCopyright("Copyright � Greedeks 2024")]
[assembly: AssemblyTrademark("Greedeks")]
-[assembly: AssemblyInformationalVersion("Build: 5.0.5")]
-[assembly: AssemblyVersion("5.0.52.843")]
-[assembly: AssemblyFileVersion("5.0.52.843")]
+[assembly: AssemblyInformationalVersion("Build: 5.0.6")]
+[assembly: AssemblyVersion("5.0.68.812")]
+[assembly: AssemblyFileVersion("5.0.68.812")]
[assembly: ComVisible(false)]
diff --git a/.Source/GTweak/Properties/AssemblyInfo.tt b/.Source/GTweak/Properties/AssemblyInfo.tt
index 6cb1ba1d..0841edac 100644
--- a/.Source/GTweak/Properties/AssemblyInfo.tt
+++ b/.Source/GTweak/Properties/AssemblyInfo.tt
@@ -9,7 +9,7 @@ using System.Windows;
[assembly: AssemblyProduct("GTweak")]
[assembly: AssemblyCopyright("Copyright � Greedeks 2024")]
[assembly: AssemblyTrademark("Greedeks")]
-[assembly: AssemblyInformationalVersion("Build: 5.0.5")]
+[assembly: AssemblyInformationalVersion("Build: 5.0.6")]
[assembly: AssemblyVersion("5.<#= GenerateVersion() #>")]
[assembly: AssemblyFileVersion("5.<#= GenerateVersion() #>")]
diff --git a/.Source/GTweak/Utilities/Helpers/RegistryHelp.cs b/.Source/GTweak/Utilities/Helpers/RegistryHelp.cs
index 68d6db7e..de70dfe7 100644
--- a/.Source/GTweak/Utilities/Helpers/RegistryHelp.cs
+++ b/.Source/GTweak/Utilities/Helpers/RegistryHelp.cs
@@ -9,13 +9,16 @@ namespace GTweak.Utilities.Helpers
{
internal static void DeleteValue(RegistryKey registrykey, string subkey, string value, bool isTakingOwner = false)
{
- Task.Run(delegate
+ Task.Run(async delegate
{
if (registrykey.OpenSubKey(subkey) == null || registrykey.OpenSubKey(subkey)?.GetValue(value, null) == null) return;
try
{
if (isTakingOwner)
+ {
TakingOwnership.GrantAdministratorsAccess($@"MACHINE\{subkey}", TakingOwnership.SE_OBJECT_TYPE.SE_REGISTRY_KEY);
+ await Task.Delay(200);
+ }
registrykey.OpenSubKey(subkey, true)?.DeleteValue(value);
}
@@ -25,12 +28,15 @@ namespace GTweak.Utilities.Helpers
internal static void Write<T>(RegistryKey registrykey, string subkey, string name, T data, RegistryValueKind kind, bool isTakingOwner = false)
{
- Task.Run(delegate
+ Task.Run(async delegate
{
try
{
if (isTakingOwner)
+ {
TakingOwnership.GrantAdministratorsAccess($@"MACHINE\{subkey}", TakingOwnership.SE_OBJECT_TYPE.SE_REGISTRY_KEY);
+ await Task.Delay(200);
+ }
registrykey.CreateSubKey(subkey, true)?.SetValue(name, data, kind);
}
diff --git a/.Source/GTweak/Utilities/Helpers/TaskSchedulerManager.cs b/.Source/GTweak/Utilities/Helpers/TaskSchedulerManager.cs
index 26e889d8..c740c48f 100644
--- a/.Source/GTweak/Utilities/Helpers/TaskSchedulerManager.cs
+++ b/.Source/GTweak/Utilities/Helpers/TaskSchedulerManager.cs
@@ -1,4 +1,5 @@
-using System.Linq;
+using GTweak.Utilities.Control;
+using System.Linq;
using System.Threading.Tasks;
namespace GTweak.Utilities.Helpers
@@ -19,7 +20,7 @@ namespace GTweak.Utilities.Helpers
return numberRunningTask > 0;
}
- internal static void EnablingTasks(string[] tasklist)
+ internal static void SetTaskState(string[] tasklist, bool state)
{
Task.Run(delegate
{
@@ -29,9 +30,9 @@ namespace GTweak.Utilities.Helpers
using Microsoft.Win32.TaskScheduler.Task task = taskService.GetTask(taskname);
if (task != null)
{
- if (!task.Enabled)
+ if (task.Enabled != state)
{
- task.Definition.Settings.Enabled = true;
+ task.Definition.Settings.Enabled = state;
task.RegisterChanges();
}
}
@@ -39,23 +40,17 @@ namespace GTweak.Utilities.Helpers
});
}
- internal static void DisablingTasks(string[] tasklist)
+ internal static void SetTaskStateOwner(string[] tasklist, bool state)
{
Task.Run(delegate
{
- using Microsoft.Win32.TaskScheduler.TaskService taskService = new Microsoft.Win32.TaskScheduler.TaskService();
- foreach (string taskname in tasklist)
- {
- using Microsoft.Win32.TaskScheduler.Task task = taskService.GetTask(taskname);
- if (task != null)
- {
- if (task.Enabled)
- {
- task.Definition.Settings.Enabled = false;
- task.RegisterChanges();
- }
- }
- }
+ string command = "cmd.exe /c ";
+ foreach (string task in tasklist)
+ command += $"schtasks /change {(state ? "/enable" : "/disable")} /tn \"{task}\" & ";
+
+ command = command.TrimEnd(' ', '&');
+
+ TrustedInstaller.CreateProcessAsTrustedInstaller(Settings.PID, command);
});
}
}
diff --git a/.Source/GTweak/Utilities/Tweaks/ConfidentialityTweaks.cs b/.Source/GTweak/Utilities/Tweaks/ConfidentialityTweaks.cs
index c444e585..d31d70f2 100644
--- a/.Source/GTweak/Utilities/Tweaks/ConfidentialityTweaks.cs
+++ b/.Source/GTweak/Utilities/Tweaks/ConfidentialityTweaks.cs
@@ -182,22 +182,16 @@ namespace GTweak.Utilities.Tweaks
break;
case "TglButton3":
RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Control\WMI\Autologger\Diagtrack-Listener", "Start", isChoose ? 0 : 1, RegistryValueKind.DWord);
+
if (isChoose)
- {
RegistryHelp.Write(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Attachments", "SaveZoneInformation", 1, RegistryValueKind.DWord);
- DisablingTasks(TelemetryTasks);
- }
else
- {
RegistryHelp.DeleteValue(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Attachments", "SaveZoneInformation");
- EnablingTasks(TelemetryTasks);
- }
+
+ SetTaskState(TelemetryTasks, !isChoose);
break;
case "TglButton4":
- if (isChoose)
- DisablingTasks(SchedulerTasks);
- else
- EnablingTasks(SchedulerTasks);
+ SetTaskState(SchedulerTasks, !isChoose);
break;
case "TglButton5":
if (isChoose)
@@ -313,17 +307,12 @@ namespace GTweak.Utilities.Tweaks
}
break;
case "TglButton16":
- string valueState = isChoose ? "4" : "3";
- TrustedInstaller.CreateProcessAsTrustedInstaller(Control.Settings.PID, $"cmd.exe /c reg add HKLM\\SYSTEM\\CurrentControlSet\\Services\\diagnosticshub.standardcollector.service /t REG_DWORD /v Start /d {valueState} /f");
- RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\diagnosticshub.standardcollector.service", "Start", int.Parse(valueState), RegistryValueKind.DWord, true);
+ TrustedInstaller.CreateProcessAsTrustedInstaller(Control.Settings.PID, $@"cmd.exe /c reg add HKLM\SYSTEM\CurrentControlSet\Services\diagnosticshub.standardcollector.service /t REG_DWORD /v Start /d {(isChoose ? "4" : "3")} /f");
+ RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\diagnosticshub.standardcollector.service", "Start", isChoose ? 4 : 3, RegistryValueKind.DWord, true);
break;
case "TglButton17":
RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\NvTelemetryContainer", "Start", isChoose ? 4 : 2, RegistryValueKind.DWord);
-
- if (isChoose)
- DisablingTasks(NvidiaTasks);
- else
- EnablingTasks(NvidiaTasks);
+ SetTaskState(NvidiaTasks, !isChoose);
break;
case "TglButton18":
if (isChoose)
diff --git a/.Source/GTweak/Utilities/Tweaks/Firewall.cs b/.Source/GTweak/Utilities/Tweaks/Firewall.cs
index bac945f6..35210e9e 100644
--- a/.Source/GTweak/Utilities/Tweaks/Firewall.cs
+++ b/.Source/GTweak/Utilities/Tweaks/Firewall.cs
@@ -3,6 +3,7 @@ using GTweak.Utilities.Helpers;
using NetFwTypeLib;
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
using System.Windows;
@@ -155,7 +156,7 @@ namespace GTweak.Utilities.Tweaks
protected static void BlockWDefender(bool isChoose)
{
try { Parallel.Invoke(() => { ChangeRulesOut(isChoose, PathsForPrograms["WD"], NameRules["WDefender"], "blocking Windows Defender database updates"); }); }
- catch { new ViewNotification().Show("", "warn", (string)Application.Current.Resources["firewalloff_notification"]); }
+ catch (Exception ex) { Debug.Write(ex.Message); };
}
}
}
diff --git a/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.cs b/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.cs
index 8d9992c8..10492ec4 100644
--- a/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.cs
+++ b/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.cs
@@ -9,6 +9,7 @@ using System.Diagnostics;
using System.IO;
using System.Security.AccessControl;
using System.Security.Principal;
+using System.ServiceProcess;
using System.Threading.Tasks;
namespace GTweak.Utilities.Tweaks
@@ -416,49 +417,41 @@ namespace GTweak.Utilities.Tweaks
{
Task.Run(delegate
{
- void SetFullAccess(string path)
- {
- FileSecurity security = File.GetAccessControl(path);
- security.SetOwner(WindowsIdentity.GetCurrent().User);
- security.SetAccessRule(new FileSystemAccessRule(WindowsIdentity.GetCurrent().User, FileSystemRights.FullControl, AccessControlType.Allow));
- File.SetAccessControl(path, security);
- }
-
- void ChangeStateTask(string valueState = "/disable")
- {
- TrustedInstaller.CreateProcessAsTrustedInstaller(Settings.PID, "cmd.exe /c schtasks /change " + valueState + " /tn \"\\Microsoft\\Windows\\UpdateOrchestrator\\Report policies\" & " +
- "schtasks /change " + valueState + " /tn \"\\Microsoft\\Windows\\UpdateOrchestrator\\Schedule Scan\" & " +
- "schtasks /change " + valueState + " /tn \"\\Microsoft\\Windows\\UpdateOrchestrator\\Schedule Scan Static Task\" & " +
- "schtasks /change " + valueState + " /tn \"\\Microsoft\\Windows\\UpdateOrchestrator\\Schedule Work\" & " +
- "schtasks /change " + valueState + " /tn \"\\Microsoft\\Windows\\UpdateOrchestrator\\Start Oobe Expedite Work\" & " +
- "schtasks /change " + valueState + " /tn \"\\Microsoft\\Windows\\UpdateOrchestrator\\StartOobeAppsScanAfterUpdate\" & " +
- "schtasks /change " + valueState + " /tn \"\\Microsoft\\Windows\\UpdateOrchestrator\\StartOobeAppsScan_LicenseAccepted\" & " +
- "schtasks /change " + valueState + " /tn \"\\Microsoft\\Windows\\UpdateOrchestrator\\USO_UxBroker\" & " +
- "schtasks /change " + valueState + " /tn \"\\Microsoft\\Windows\\UpdateOrchestrator\\UUS Failover Task\" & " +
- "schtasks /change " + valueState + " /tn \"\\Microsoft\\Windows\\WindowsUpdate\\Refresh Group Policy Cache\" & " +
- "schtasks /change " + valueState + " /tn \"\\Microsoft\\Windows\\WindowsUpdate\\Scheduled Start\"");
- }
+ string cachePath = Path.Combine(UsePath.SystemDisk, @"Windows\SoftwareDistribution\Download");
+
+ string[] WinUpdateTasks = new string[] {
+ @"Microsoft\Windows\UpdateOrchestrator\Report policies",
+ @"Microsoft\Windows\UpdateOrchestrator\Schedule Scan",
+ @"Microsoft\Windows\UpdateOrchestrator\Schedule Scan Static Task",
+ @"Microsoft\Windows\UpdateOrchestrator\Schedule Work",
+ @"Microsoft\Windows\UpdateOrchestrator\Start Oobe Expedite Work",
+ @"Microsoft\Windows\UpdateOrchestrator\StartOobeAppsScanAfterUpdate",
+ @"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\Scheduled Start"};
try
{
- if (!isDenyAccess)
- ChangeStateTask("/enable");
- else
+ if (isDenyAccess)
{
- SetFullAccess(UsePath.SystemDisk + @"Windows\SoftwareDistribution\Download");
- SetFullAccess(UsePath.SystemDisk + @"Windows\System32\catroot2");
-
- Process.Start(new ProcessStartInfo()
+ using (ServiceController updateService = new ServiceController("wuauserv"))
{
- Arguments = @" /c rd /s /q " + UsePath.SystemDisk + @"Windows\SoftwareDistribution\Download &
- rd /s /q " + UsePath.SystemDisk + @"Windows\System32\catroot2",
- WindowStyle = ProcessWindowStyle.Hidden,
- CreateNoWindow = true,
- FileName = "cmd.exe"
- });
-
- ChangeStateTask();
+ if (updateService.Status == ServiceControllerStatus.Running)
+ {
+ updateService.Stop();
+ updateService.WaitForStatus(ServiceControllerStatus.Stopped);
+ }
+
+ if (Directory.Exists(cachePath))
+ Directory.Delete(cachePath, true);
+ }
+
+ SetTaskStateOwner(WinUpdateTasks, false);
}
+ else
+ SetTaskStateOwner(WinUpdateTasks, true);
}
catch (Exception ex) { Debug.WriteLine(ex); }
});
diff --git a/.Source/GTweak/Utilities/Tweaks/SystemTweaks.cs b/.Source/GTweak/Utilities/Tweaks/SystemTweaks.cs
index 71a34775..ab495816 100644
--- a/.Source/GTweak/Utilities/Tweaks/SystemTweaks.cs
+++ b/.Source/GTweak/Utilities/Tweaks/SystemTweaks.cs
@@ -87,7 +87,6 @@ namespace GTweak.Utilities.Tweaks
catch (Exception ex) { Debug.WriteLine(ex.Message); };
systemV.TglButton8.StateNA =
- RegistryHelp.CheckValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SecurityHealthService", "Start", "4") ||
RegistryHelp.CheckValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Features", "TamperProtection", "0") ||
RegistryHelp.CheckValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\App and Browser protection", "DisallowExploitProtectionOverride", "0") ||
RegistryHelp.CheckValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender Security Center\App and Browser protection", "UILockdown", "1") ||
@@ -295,10 +294,7 @@ namespace GTweak.Utilities.Tweaks
}
break;
case "TglButton12":
- if (isChoose)
- DisablingTasks(schedulerTasks);
- else
- EnablingTasks(schedulerTasks);
+ SetTaskState(schedulerTasks, !isChoose);
break;
case "TglButton13":
string argStateNetsh = string.Empty, argStateNetshSecond = string.Empty;
diff --git a/.Source/GTweak/Utilities/Tweaks/WindowsDefender.cs b/.Source/GTweak/Utilities/Tweaks/WindowsDefender.cs
index ebc60109..3f453a9c 100644
--- a/.Source/GTweak/Utilities/Tweaks/WindowsDefender.cs
+++ b/.Source/GTweak/Utilities/Tweaks/WindowsDefender.cs
@@ -267,6 +267,29 @@ namespace GTweak.Utilities.Tweaks
await Task.Delay(1000);
+ TrustedInstaller.CreateProcessAsTrustedInstaller(Settings.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 & " +
+ "reg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\" /t REG_DWORD /v DisableAntiSpyware /d 1 /f & " +
+ "reg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\" /t REG_DWORD /v DisableAntiVirus /d 1 /f & " +
+ "reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows Defender\\Real-Time Protection\" /t REG_DWORD /v DisableBehaviorMonitoring /d 1 /f & " +
+ "reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows Defender\\Real-Time Protection\" /t REG_DWORD /v DisableOnAccessProtection /d 1 /f & " +
+ "reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows Defender\\Real-Time Protection\" /t REG_DWORD /v DisableScanOnRealtimeEnable /d 1 /f & " +
+ "reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows Defender\\Real-Time Protection\" /t REG_DWORD /v DisableIOAVProtection /d 1 /f & " +
+ "reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows Defender\\Real-Time Protection\" /t REG_DWORD /v DisableRealtimeMonitoring /d 1 /f & " +
+ "reg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\\Spynet\" /t REG_DWORD /v SpyNetReporting /d 0 /f & " +
+ "reg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\\Spynet\" /t REG_DWORD /v SubmitSamplesConsent /d 2 /f & " +
+ "reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows Defender\\Features\" /t REG_DWORD /v TamperProtection /d 0 /f & " +
+ "reg add HKLM\\SOFTWARE\\Policies\\Microsoft\\MRT /t REG_DWORD /v DontOfferThroughWUA /d 1 /f & " +
+ "reg add HKLM\\SOFTWARE\\Policies\\Microsoft\\MRT /t REG_DWORD /v DontReportInfectionInformation /d 1 /f & " +
+ "reg add HKLM\\SYSTEM\\CurrentControlSet\\Services\\SecurityHealthService /t REG_DWORD /v Start /d 4 /f &" +
+ "reg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\\SmartScreen\" /t REG_SZ /v ConfigureAppInstallControl /d \"Anywhere\" /f & " +
+ "reg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\\SmartScreen\" /t REG_DWORD /v ConfigureAppInstallControlEnabled /d 0 /f & " +
+ "reg add HKLM\\SYSTEM\\CurrentControlSet\\Services\\WinDefend /t REG_DWORD /v Start /d 4 /f & " +
+ "reg add HKLM\\SYSTEM\\CurrentControlSet\\Services\\WinDefend /t REG_DWORD /v AutorunsDisabled / d 3 /f & " +
+ "reg add HKLM\\SYSTEM\\CurrentControlSet\\Services\\WdNisSvc /t REG_DWORD /v Start /d 4 /f");
+
RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\WinDefend", "Start", "4", RegistryValueKind.DWord, true);
RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\WinDefend", "AutorunsDisabled", "3", RegistryValueKind.DWord);
RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\SecurityHealthService", "Start", "4", RegistryValueKind.DWord, true);
@@ -280,29 +303,6 @@ namespace GTweak.Utilities.Tweaks
RunCmdCommand("sc config WinDefend start= disabled");
RunPowerShellCommand("Stop-Service -Name WinDefend; Set-Service -Name WinDefend -StartupType Disabled");
- TrustedInstaller.CreateProcessAsTrustedInstaller(Settings.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 & " +
- "reg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\" /t REG_DWORD /v DisableAntiSpyware /d 1 /f & " +
- "reg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\" /t REG_DWORD /v DisableAntiVirus /d 1 /f & " +
- "reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows Defender\\Real-Time Protection\" /t REG_DWORD /v DisableBehaviorMonitoring /d 1 /f & " +
- "reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows Defender\\Real-Time Protection\" /t REG_DWORD /v DisableOnAccessProtection /d 1 /f & " +
- "reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows Defender\\Real-Time Protection\" /t REG_DWORD /v DisableScanOnRealtimeEnable /d 1 /f & " +
- "reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows Defender\\Real-Time Protection\" /t REG_DWORD /v DisableIOAVProtection /d 1 /f & " +
- "reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows Defender\\Real-Time Protection\" /t REG_DWORD /v DisableRealtimeMonitoring /d 1 /f & " +
- "reg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\\Spynet\" /t REG_DWORD /v SpyNetReporting /d 0 /f & " +
- "reg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\\Spynet\" /t REG_DWORD /v SubmitSamplesConsent /d 2 /f & " +
- "reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows Defender\\Features\" /t REG_DWORD /v TamperProtection /d 0 /f & " +
- "reg add HKLM\\SOFTWARE\\Policies\\Microsoft\\MRT /t REG_DWORD /v DontOfferThroughWUA /d 1 /f & " +
- "reg add HKLM\\SOFTWARE\\Policies\\Microsoft\\MRT /t REG_DWORD /v DontReportInfectionInformation /d 1 /f & " +
- "reg add HKLM\\SYSTEM\\CurrentControlSet\\Services\\SecurityHealthService /t REG_DWORD /v Start /d 4 /f &" +
- "reg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\\SmartScreen\" /t REG_SZ /v ConfigureAppInstallControl /d \"Anywhere\" /f & " +
- "reg add \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\\SmartScreen\" /t REG_DWORD /v ConfigureAppInstallControlEnabled /d 0 /f & " +
- "reg add HKLM\\SYSTEM\\CurrentControlSet\\Services\\WinDefend /t REG_DWORD /v Start /d 4 /f & " +
- "reg add HKLM\\SYSTEM\\CurrentControlSet\\Services\\WinDefend /t REG_DWORD /v AutorunsDisabled / d 3 /f & " +
- "reg add HKLM\\SYSTEM\\CurrentControlSet\\Services\\WdNisSvc /t REG_DWORD /v Start /d 4 /f");
-
RegistryHelp.DeleteFolderTree(Registry.ClassesRoot, @"*\shellex\ContextMenuHandlers\EPP");
RegistryHelp.DeleteFolderTree(Registry.ClassesRoot, @"Directory\shellex\ContextMenuHandlers\EPP");
RegistryHelp.DeleteFolderTree(Registry.ClassesRoot, @"Drive\shellex\ContextMenuHandlers\EPP");
diff --git a/.Source/GTweak/View/PakagesView.xaml.cs b/.Source/GTweak/View/PakagesView.xaml.cs
index 77ba85b8..32f093d9 100644
--- a/.Source/GTweak/View/PakagesView.xaml.cs
+++ b/.Source/GTweak/View/PakagesView.xaml.cs
@@ -54,9 +54,9 @@ namespace GTweak.View
BackgroundQueue backgroundQueue = new BackgroundQueue();
await backgroundQueue.QueueTask(delegate { UninstallingPakages.DeletingPackage(applicationName); });
- await Task.Delay(2000);
- UpdateViewStatePakages();
+ await Task.Delay(8000);
UninstallingPakages.IsAppUnavailable[appImage.Name] = false;
+ UpdateViewStatePakages();
break;
}
@@ -70,9 +70,9 @@ namespace GTweak.View
BackgroundQueue backgroundQueue = new BackgroundQueue();
await backgroundQueue.QueueTask(delegate { UninstallingPakages.ResetOneDrive(); });
- await Task.Delay(2000);
- UpdateViewStatePakages();
+ await Task.Delay(6000);
UninstallingPakages.IsAppUnavailable[appImage.Name] = false;
+ UpdateViewStatePakages();
break;
}
}