Add dynamic variable location

Change script execution location for dynamic variable
pull/2/head v1.1.1
Romanitho 2022-01-18 14:13:29 +01:00 committed by GitHub
parent b1c468117a
commit 3ccff07c27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#Send Notif Script #Send Notif Script
#get xml notif config #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} if (!($NotifConf)) {break}
#Load Assemblies #Load Assemblies

View File

@ -1,6 +1,6 @@
function Init { function Init {
#Var #Var
$Script:WorkingDir = "C:\ProgramData\winget-update" $Script:WorkingDir = $PSScriptRoot
#Logs initialisation #Logs initialisation
$LogPath = "$WorkingDir\logs" $LogPath = "$WorkingDir\logs"