Put WAU scheduled tasks to dedicated folder

pull/412/head^2
romanitho 2023-10-05 18:34:45 +02:00
parent 3c92204c44
commit 1fd93b6c04
1 changed files with 1 additions and 1 deletions

View File

@ -366,7 +366,7 @@ function Install-WingetAutoUpdate {
#Set task readable/runnable for all users
$scheduler = New-Object -ComObject "Schedule.Service"
$scheduler.Connect()
$task = $scheduler.GetFolder("").GetTask("Winget-AutoUpdate")
$task = $scheduler.GetFolder("WAU").GetTask("Winget-AutoUpdate")
$sec = $task.GetSecurityDescriptor(0xF)
$sec = $sec + '(A;;GRGX;;;AU)'
$task.SetSecurityDescriptor($sec, 0)