parent
510c49c726
commit
4f29020224
|
@ -1,7 +1,7 @@
|
|||
#Send Notif Script
|
||||
|
||||
#get xml notif config
|
||||
[xml]$NotifConf = Get-Content "$PSScriptRoot\notif.xml" -Encoding UTF8 -ErrorAction SilentlyContinue
|
||||
[xml]$NotifConf = Get-Content "C:\ProgramData\winget-update\notif.xml" -Encoding UTF8 -ErrorAction SilentlyContinue
|
||||
if (!($NotifConf)) {break}
|
||||
|
||||
#Load Assemblies
|
||||
|
|
|
@ -59,7 +59,11 @@ function Start-NotifTask ($Title,$Message,$MessageType,$Balise) {
|
|||
"@
|
||||
|
||||
#Save XML File
|
||||
$ToastTemplate.Save("$WorkingDir\notif.xml")
|
||||
$ToastTemplateLocation = "C:\ProgramData\winget-update\"
|
||||
if (!(Test-Path $ToastTemplateLocation)){
|
||||
New-Item -ItemType Directory -Force -Path $ToastTemplateLocation
|
||||
}
|
||||
$ToastTemplate.Save("$ToastTemplateLocation\notif.xml")
|
||||
|
||||
#Send Notification to user
|
||||
Get-ScheduledTask -TaskName "Winget Update Notify" -ErrorAction SilentlyContinue | Start-ScheduledTask -ErrorAction SilentlyContinue
|
||||
|
|
Loading…
Reference in New Issue