Variables from User-Run moved

pull/312/head
KnifMelti 2023-04-07 13:29:55 +02:00
parent 30a3a43735
commit 55c4efdc69
2 changed files with 7 additions and 4 deletions

View File

@ -44,10 +44,6 @@ Get-NotifLocale
#Set common variables
$OnClickAction = "$WorkingDir\logs\updates.log"
$Button1Text = $NotifLocale.local.outputs.output[11].message
#The variables afterwards are used within Start-NotifTask.ps1
$Title = "Winget-AutoUpdate (WAU)"
$Balise = "Winget-AutoUpdate (WAU)"
$UserRun = $True
if ($Logs) {
if (Test-Path "$WorkingDir\logs\updates.log") {

View File

@ -14,6 +14,13 @@ function Start-NotifTask {
[Switch]$ButtonDismiss = $false
)
$caller = Get-ChildItem $MyInvocation.PSCommandPath | Select-Object -Expand Name
if ($caller -eq "User-Run.ps1") {
$Title = "Winget-AutoUpdate (WAU)"
$Balise = "Winget-AutoUpdate (WAU)"
$UserRun = $True
}
if (($WAUConfig.WAU_NotificationLevel -eq "Full") -or ($WAUConfig.WAU_NotificationLevel -eq "SuccessOnly" -and $MessageType -eq "Success") -or ($UserRun)) {
# XML Toast template creation