diff --git a/winget-update/winget-notify.ps1 b/winget-update/winget-notify.ps1 index d8053d2..7c98651 100644 --- a/winget-update/winget-notify.ps1 +++ b/winget-update/winget-notify.ps1 @@ -1,7 +1,7 @@ #Send Notif Script #get xml notif config -[xml]$NotifConf = Get-Content "C:\ProgramData\winget-update\notif.xml" -Encoding UTF8 +[xml]$NotifConf = Get-Content "$PSScriptRoot\notif.xml" -Encoding UTF8 if (!($NotifConf)) {break} #Load Assemblies diff --git a/winget-update/winget-upgrade.ps1 b/winget-update/winget-upgrade.ps1 index b6c6870..ed16a94 100644 --- a/winget-update/winget-upgrade.ps1 +++ b/winget-update/winget-upgrade.ps1 @@ -1,6 +1,6 @@ function Init { #Var - $Script:WorkingDir = "C:\ProgramData\winget-update" + $Script:WorkingDir = $PSScriptRoot #Logs initialisation $LogPath = "$WorkingDir\logs" @@ -277,4 +277,4 @@ else{ $Balise = "connection" Run-NotifTask $Title $Message $MessageType $Balise } -Write-Log "End of process!" "Cyan" +Write-Log "End of process!" "Cyan" \ No newline at end of file