mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-06-04 14:17:27 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user