Skip to content

Portable Tool for an Ideal Windows Setup

add disabling printer tasks

Greedeks99848e9e28f9
diff --git a/.Source/GTweak/Utilities/Storage/TaskStorage.cs b/.Source/GTweak/Utilities/Storage/TaskStorage.cs
index a1abce5d..8b82e6eb 100644
--- a/.Source/GTweak/Utilities/Storage/TaskStorage.cs
+++ b/.Source/GTweak/Utilities/Storage/TaskStorage.cs
@@ -56,6 +56,11 @@ namespace GTweak.Utilities.Storage
@"\Microsoft\Xbox\Maintenance\MaintenanceTask",
@"\Microsoft\Xbox\XGamingServices\GameServicesTask" };
+ protected static readonly string[] printTasks = {
+ @"\Microsoft\Windows\Printing\EduPrintProv",
+ @"\Microsoft\Windows\Printing\PrinterCleanupTask",
+ @"\Microsoft\Windows\Printing\PrintJobCleanupTask" };
+
protected static readonly string bluetoothTask = @"\Microsoft\Windows\Bluetooth\UninstallDeviceTask";
protected static readonly string[] mapsTasks = {
diff --git a/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.cs b/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.cs
index 8aeca196..a37db721 100644
--- a/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.cs
+++ b/.Source/GTweak/Utilities/Tweaks/ServicesTweaks.cs
@@ -318,6 +318,7 @@ namespace GTweak.Utilities.Tweaks
}
}
catch (Exception ex) { ErrorLogging.LogDebug(ex); }
+ SetTaskState(!isDisabled, printTasks);
break;
case "TglButton9":
RegistryHelp.Write(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Services\WiaRpc", "Start", isDisabled ? 4 : 3, RegistryValueKind.DWord);
diff --git a/.Source/GTweak/Utilities/Tweaks/UninstallingPakages.cs b/.Source/GTweak/Utilities/Tweaks/UninstallingPakages.cs
index 0801cd80..ae71ded6 100644
--- a/.Source/GTweak/Utilities/Tweaks/UninstallingPakages.cs
+++ b/.Source/GTweak/Utilities/Tweaks/UninstallingPakages.cs
@@ -168,14 +168,14 @@ namespace GTweak.Utilities.Tweaks
return;
}
- string Alias = details.Alias;
+ string alias = details.Alias;
IReadOnlyList<string> scripts = details.Scripts;
List<string> packageNamesToRemove = new List<string> { packageName };
- if (!string.IsNullOrWhiteSpace(Alias))
+ if (!string.IsNullOrWhiteSpace(alias))
{
- packageNamesToRemove.Add(Alias);
+ packageNamesToRemove.Add(alias);
}
if (scripts != null && scripts.Count > 0)