Fix notif

pull/201/head
Romain 2022-10-23 23:36:15 +02:00 committed by GitHub
parent 666fddb31b
commit dbfa68ac8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,8 @@
#Send Notif Script #Send Notif Script
#get xml notif config #get xml notif config
[xml]$NotifConf = Get-Content "$env:ProgramData\Winget-AutoUpdate\config\notif.xml" -Encoding UTF8 -ErrorAction SilentlyContinue $WAUinstalledPath = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate\" -Name InstallLocation
[xml]$NotifConf = Get-Content "$WAUinstalledPath\config\notif.xml" -Encoding UTF8 -ErrorAction SilentlyContinue
if (!($NotifConf)) { if (!($NotifConf)) {
break break
} }

View File

@ -27,7 +27,7 @@ function Start-NotifTask ($Title, $Message, $MessageType, $Balise, $OnClickActio
if ($IsSystem) { if ($IsSystem) {
#Save XML to File #Save XML to File
$ToastTemplateLocation = "$env:ProgramData\Winget-AutoUpdate\config\" $ToastTemplateLocation = "$($WAUConfig.InstallLocation)\config\"
if (!(Test-Path $ToastTemplateLocation)) { if (!(Test-Path $ToastTemplateLocation)) {
New-Item -ItemType Directory -Force -Path $ToastTemplateLocation New-Item -ItemType Directory -Force -Path $ToastTemplateLocation
} }