Cleanup: Delete all Scheduled Tasks related things (#4435)

* Delete functions/private/Set-WinUtilScheduledTask.ps1

* Update Invoke-WinUtilTweaks.ps1

* Update Invoke-WinUtilCurrentSystem.ps1

* waste of time

---------

Co-authored-by: Gabi <218829269+GabiNun2@users.noreply.github.com>
This commit is contained in:
Chris Titus
2026-04-30 15:16:27 -05:00
committed by GitHub
parent 9d4613d838
commit 184fe22a35
5 changed files with 1 additions and 80 deletions
@@ -44,21 +44,18 @@ Function Invoke-WinUtilCurrentSystem {
if ($CheckBox -eq "tweaks") {
if (!(Test-Path 'HKU:\')) {$null = (New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS)}
$ScheduledTasks = Get-ScheduledTask
$sync.configs.tweaks | Get-Member -MemberType NoteProperty | ForEach-Object {
$Config = $psitem.Name
#WPFEssTweaksTele
$entry = $sync.configs.tweaks.$Config
$registryKeys = $entry.registry
$scheduledtaskKeys = $entry.scheduledtask
$serviceKeys = $entry.service
$appxKeys = $entry.appx
$invokeScript = $entry.InvokeScript
$entryType = $entry.Type
if ($registryKeys -or $scheduledtaskKeys -or $serviceKeys) {
if ($registryKeys -or $serviceKeys) {
$Values = @()
if ($entryType -eq "Toggle") {
@@ -103,20 +100,6 @@ Function Invoke-WinUtilCurrentSystem {
}
}
Foreach ($tweaks in $scheduledtaskKeys) {
Foreach ($tweak in $tweaks) {
$task = $ScheduledTasks | Where-Object {$($psitem.TaskPath + $psitem.TaskName) -like "\$($tweak.name)"}
if ($task) {
$actualValue = $task.State
$expectedValue = $tweak.State
if ($expectedValue -ne $actualValue) {
$values += $False
}
}
}
}
Foreach ($tweaks in $serviceKeys) {
Foreach ($tweak in $tweaks) {
$Service = Get-Service -Name $tweak.Name