From 93a076c46bc916a640b691e63e6f12cdae0c8d40 Mon Sep 17 00:00:00 2001 From: Romain <96626929+Romanitho@users.noreply.github.com> Date: Sun, 1 Sep 2024 23:11:08 +0200 Subject: [PATCH] relative path --- Sources/WAU Configurator.bat | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Sources/WAU Configurator.bat b/Sources/WAU Configurator.bat index 4097b76..2532989 100644 --- a/Sources/WAU Configurator.bat +++ b/Sources/WAU Configurator.bat @@ -28,13 +28,13 @@ if ( $psversionTable.PSEdition -eq "core" ) { import-Module -name Appx -UseWIndowsPowershell -WarningAction:SilentlyContinue } -$Script:WAUConfiguratorVersion = Get-Content "$PSScriptRoot\Winget-AutoUpdate\Version.txt" +$Script:WAUConfiguratorVersion = Get-Content ".\Winget-AutoUpdate\Version.txt" <# FUNCTIONS #> -. "$PSScriptRoot\Winget-AutoUpdate\functions\Update-WinGet.ps1" -. "$PSScriptRoot\Winget-AutoUpdate\functions\Get-WingetCmd.ps1" +. ".\Winget-AutoUpdate\functions\Update-WinGet.ps1" +. ".\Winget-AutoUpdate\functions\Get-WingetCmd.ps1" #Function to start or update popup Function Start-PopUp ($Message) { @@ -183,12 +183,12 @@ function Start-Installations { if ($WAUUseWhiteList) { $WAUParameters += "-UseWhiteList " if ($WAUListPath) { - Copy-Item $WAUListPath -Destination "$PSScriptRoot\included_apps.txt" -Force -ErrorAction SilentlyContinue + Copy-Item $WAUListPath -Destination ".\included_apps.txt" -Force -ErrorAction SilentlyContinue } } else { if ($WAUListPath) { - Copy-Item $WAUListPath -Destination "$PSScriptRoot\excluded_apps.txt" -Force -ErrorAction SilentlyContinue + Copy-Item $WAUListPath -Destination ".\excluded_apps.txt" -Force -ErrorAction SilentlyContinue } } if ($WAUDesktopShortcut) { @@ -202,7 +202,7 @@ function Start-Installations { } #Install Winget-Autoupdate - Start-Process "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -Command ""& '$PSScriptRoot\Winget-AutoUpdate-Install.ps1' $WAUParameters""" -Wait -Verb RunAs + Start-Process "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -Command ""& '.\Winget-AutoUpdate-Install.ps1' $WAUParameters""" -Wait -Verb RunAs } @@ -275,7 +275,7 @@ function Start-Uninstallations ($AppToUninstall) { #Run Winget-Install -Uninstall $AppsToUninstall = "'$($AppToUninstall -join "','")'" - Start-Process "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -Command `"$PSScriptRoot\Winget-AutoUpdate\Winget-Install.ps1 -AppIDs $AppsToUninstall -Uninstall`"" -Wait -Verb RunAs + Start-Process "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -Command `".\Winget-AutoUpdate\Winget-Install.ps1 -AppIDs $AppsToUninstall -Uninstall`"" -Wait -Verb RunAs Close-PopUp }