Skip to content

Commit

Permalink
Add dynamic variable location
Browse files Browse the repository at this point in the history
Change script execution location for dynamic variable
  • Loading branch information
Romanitho authored Jan 18, 2022
1 parent b1c4681 commit 3ccff07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion winget-update/winget-notify.ps1
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions winget-update/winget-upgrade.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function Init {
#Var
$Script:WorkingDir = "C:\ProgramData\winget-update"
$Script:WorkingDir = $PSScriptRoot

#Logs initialisation
$LogPath = "$WorkingDir\logs"
Expand Down Expand Up @@ -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"

0 comments on commit 3ccff07

Please sign in to comment.