diff --git a/config/applications.json b/config/applications.json index b4f67cda..269a072e 100644 --- a/config/applications.json +++ b/config/applications.json @@ -25,7 +25,7 @@ "winget": "BlenderFoundation.Blender" }, "Installbrave": { - "winget": "BraveSoftware.BraveBrowser" + "winget": "Brave.Brave" }, "Installchrome": { "winget": "Google.Chrome" diff --git a/winutil.ps1 b/winutil.ps1 index e7f8721e..4ebd29eb 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -584,6 +584,8 @@ Version 0.1 Write-Logs -Level INFO -Message "Starting ScheduledTask Modification" -LogPath $sync.logfile $ScheduledTaskToModify | ForEach-Object { + Get-ScheduledTask -TaskName "$($psitem.name)" -ErrorAction SilentlyContinue -OutVariable checktask + if ($checktask) { Try{ if($($psitem.State) -eq "Disabled"){ Disable-ScheduledTask -TaskName "$($psitem.name)" -ErrorAction Stop | Out-Null @@ -593,7 +595,8 @@ Version 0.1 } Write-Logs -Level INFO -Message "Scheduled Task $($psitem.name) set to $($psitem.State)" -LogPath $sync.logfile }Catch{Write-Logs -Level ERROR -Message "Unable to set Scheduled Task $($psitem.name) set to $($psitem.State)" -LogPath $sync.logfile} - } + } + } Write-Logs -Level INFO -Message "Finished setting ScheduledTasks" -LogPath $sync.logfile }