WorkingDir as in NotifLocale
parent
9c75bf1022
commit
4f7f62a9f6
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
function Start-NotifTask ($Title, $Message, $MessageType, $Balise, $OnClickAction) {
|
function Start-NotifTask ($Title, $Message, $MessageType, $Balise, $OnClickAction) {
|
||||||
|
|
||||||
if (($WAUConfig.WAU_NotificationLevel -eq "Full") -or ($WAUConfig.WAU_NotificationLevel -eq "SuccessOnly" -and $MessageType -eq "Success") -or ($userrun)) {
|
if (($WAUConfig.WAU_NotificationLevel -eq "Full") -or ($WAUConfig.WAU_NotificationLevel -eq "SuccessOnly" -and $MessageType -eq "Success") -or ($UserRun)) {
|
||||||
|
|
||||||
#Prepare OnClickAction (if set)
|
#Prepare OnClickAction (if set)
|
||||||
if ($OnClickAction){
|
if ($OnClickAction){
|
||||||
|
|
|
@ -26,24 +26,24 @@ param(
|
||||||
<# MAIN #>
|
<# MAIN #>
|
||||||
|
|
||||||
#Get Working Dir
|
#Get Working Dir
|
||||||
$Script:WorkingDir = $PSScriptRoot
|
$Script:WorkingDir = $WorkingDir
|
||||||
|
|
||||||
#Load functions
|
#Load functions
|
||||||
. $PSScriptRoot\functions\Get-NotifLocale.ps1
|
. $WorkingDir\functions\Get-NotifLocale.ps1
|
||||||
. $PSScriptRoot\functions\Start-NotifTask.ps1
|
. $WorkingDir\functions\Start-NotifTask.ps1
|
||||||
|
|
||||||
#Set common variables
|
#Set common variables
|
||||||
$OnClickAction = "$PSScriptRoot\logs\updates.log"
|
$OnClickAction = "$WorkingDir\logs\updates.log"
|
||||||
$Title = "Winget-AutoUpdate (WAU)"
|
$Title = "Winget-AutoUpdate (WAU)"
|
||||||
$Balise = "Winget-AutoUpdate (WAU)"
|
$Balise = "Winget-AutoUpdate (WAU)"
|
||||||
$userrun = $True
|
$UserRun = $True
|
||||||
|
|
||||||
#Get Toast Locale function
|
#Get Toast Locale function
|
||||||
Get-NotifLocale
|
Get-NotifLocale
|
||||||
|
|
||||||
if ($Logs) {
|
if ($Logs) {
|
||||||
if ((Test-Path "$PSScriptRoot\logs\updates.log")) {
|
if ((Test-Path "$WorkingDir\logs\updates.log")) {
|
||||||
Invoke-Item "$PSScriptRoot\logs\updates.log"
|
Invoke-Item "$WorkingDir\logs\updates.log"
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#Not available yet
|
#Not available yet
|
||||||
|
|
Loading…
Reference in New Issue