Portable Tool for an Ideal Windows Setup
C# activatorbloatware-removalcsharpdebloatdebloaterdisable-servicesmonitoring-systemportableprivacy-toolsregistry-tweakssystem-tuningsystem-utilitytelemetrytweakerwindows-10windows-11windows-debloatwindows-defenderwindows-optimizationwindows-tweaks
fix resolve unreliable delay in self removal and restart routines
Greedekse589a49087af
diff --git a/.Source/GTweak/Modules/Common/GlobalOptions.cs b/.Source/GTweak/Modules/Common/GlobalOptions.csindex d7b7d08e..739ce577 100644--- a/.Source/GTweak/Modules/Common/GlobalOptions.cs+++ b/.Source/GTweak/Modules/Common/GlobalOptions.cs@@ -134,12 +134,11 @@ namespace GTweak.Modules.CommonRegistryHelper.DeleteFolderTree(Registry.LocalMachine, @"SOFTWARE\Microsoft\Tracing\GTweak_RASAPI32");RegistryHelper.DeleteFolderTree(Registry.LocalMachine, @"SOFTWARE\Microsoft\Tracing\GTweak_RASMANCS");- CommandExecutor.RunCommand("/c " + CommandExecutor.CleanCommand(string.Join(" & ", new[] { $@"taskkill /f /im ""{CurrentName}""", "choice /c y /valueInt /d y /t 3", $@"del ""{CurrentLocation}""",- $@"rd /s /q ""{PathTargets.Folders.Workspace}""", $@"rd /s /q ""{Environment.SystemDirectory}\config\systemprofile\AppData\Local\GTweak""" })));+ CommandExecutor.RunCommand("/c " + CommandExecutor.CleanCommand(string.Join(" & ", new[] { $@"taskkill /f /im ""{CurrentName}""", "timeout /t 3", $@"del ""{CurrentLocation}""", $@"rd /s /q ""{PathTargets.Folders.Workspace}""", $@"rd /s /q ""{Environment.SystemDirectory}\config\systemprofile\AppData\Local\GTweak""" })));}catch (Exception ex) { ErrorLogger.LogDebug(ex); }}- internal static void SelfReboot() => CommandExecutor.RunCommand($"/c taskkill /f /im \"{CurrentName}\" & choice /c y /valueInt /d y /t 1 & start \"\" \"{CurrentLocation}\"");+ internal static void SelfReboot() => CommandExecutor.RunCommand($@"/c taskkill /f /im ""{CurrentName}"" & timeout /t 1 & start """" ""{CurrentLocation}""");}}\ No newline at end of filediff --git a/.Source/GTweak/Styles/Buttons/Buttons.xaml b/.Source/GTweak/Styles/Buttons/Buttons.xamlindex d8a84e23..6c69d56e 100644--- a/.Source/GTweak/Styles/Buttons/Buttons.xaml+++ b/.Source/GTweak/Styles/Buttons/Buttons.xaml@@ -124,7 +124,7 @@</Setter></Trigger><Trigger Property="IsMouseOver" Value="True">- <Setter TargetName="Icon" Property="Background" Value="{StaticResource Brush_Accent}"/>+ <Setter TargetName="Icon" Property="Background" Value="{StaticResource Brush_Danger_Hover}"/><Setter TargetName="BackgroundBorder" Property="Background" Value="{StaticResource Brush_TitleBtnBG_Pressed}"/></Trigger></ControlTemplate.Triggers>