WorkingDir as in NotifLocale

pull/178/head
KnifMelti 2022-10-11 18:04:25 +02:00
parent 9c75bf1022
commit 4f7f62a9f6
2 changed files with 8 additions and 8 deletions

View File

@ -2,7 +2,7 @@
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)
if ($OnClickAction){

View File

@ -26,24 +26,24 @@ param(
<# MAIN #>
#Get Working Dir
$Script:WorkingDir = $PSScriptRoot
$Script:WorkingDir = $WorkingDir
#Load functions
. $PSScriptRoot\functions\Get-NotifLocale.ps1
. $PSScriptRoot\functions\Start-NotifTask.ps1
. $WorkingDir\functions\Get-NotifLocale.ps1
. $WorkingDir\functions\Start-NotifTask.ps1
#Set common variables
$OnClickAction = "$PSScriptRoot\logs\updates.log"
$OnClickAction = "$WorkingDir\logs\updates.log"
$Title = "Winget-AutoUpdate (WAU)"
$Balise = "Winget-AutoUpdate (WAU)"
$userrun = $True
$UserRun = $True
#Get Toast Locale function
Get-NotifLocale
if ($Logs) {
if ((Test-Path "$PSScriptRoot\logs\updates.log")) {
Invoke-Item "$PSScriptRoot\logs\updates.log"
if ((Test-Path "$WorkingDir\logs\updates.log")) {
Invoke-Item "$WorkingDir\logs\updates.log"
}
else {
#Not available yet