fix notif.xml folder creation

pull/79/head
Romain 2022-05-22 15:31:17 +02:00
parent 4603bb1456
commit 2918303713
1 changed files with 2 additions and 2 deletions

View File

@ -25,11 +25,11 @@ function Start-NotifTask ($Title,$Message,$MessageType,$Balise) {
if ($currentPrincipal -eq $false){
#Save XML to File
$ToastTemplateLocation = "$env:ProgramData\Winget-AutoUpdate\"
$ToastTemplateLocation = "$env:ProgramData\Winget-AutoUpdate\config\"
if (!(Test-Path $ToastTemplateLocation)){
New-Item -ItemType Directory -Force -Path $ToastTemplateLocation
}
$ToastTemplate.Save("$ToastTemplateLocation\config\notif.xml")
$ToastTemplate.Save("$ToastTemplateLocation\notif.xml")
#Run Notify scheduled task to notify conneted users
Get-ScheduledTask -TaskName "Winget-AutoUpdate-Notify" -ErrorAction SilentlyContinue | Start-ScheduledTask -ErrorAction SilentlyContinue