From 881ce2ddc1043dfe8674e172f194b55244545c5d Mon Sep 17 00:00:00 2001 From: Romain <96626929+Romanitho@users.noreply.github.com> Date: Sun, 23 Apr 2023 17:03:35 +0200 Subject: [PATCH] WorkingDir --- Winget-AutoUpdate/functions/Invoke-UserApproval.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Winget-AutoUpdate/functions/Invoke-UserApproval.ps1 b/Winget-AutoUpdate/functions/Invoke-UserApproval.ps1 index 905324d..fbcc78d 100644 --- a/Winget-AutoUpdate/functions/Invoke-UserApproval.ps1 +++ b/Winget-AutoUpdate/functions/Invoke-UserApproval.ps1 @@ -6,7 +6,7 @@ function Invoke-UserApproval ($outdated){ if ($IsSystem) { $WAUClass = "HKLM:\Software\Classes\WAU" $WAUClassCmd = "$WAUClass\shell\open\command" - $WAUClassRun = "Wscript.exe ""$WingetUpdatePath\Invisible.vbs"" ""powershell.exe -NoProfile -ExecutionPolicy Bypass -Command & '$WingetUpdatePath\User-Run.ps1' -NotifApproved %1""" + $WAUClassRun = "Wscript.exe ""$WorkingDir\Invisible.vbs"" ""powershell.exe -NoProfile -ExecutionPolicy Bypass -Command & '$WorkingDir\User-Run.ps1' -NotifApproved %1""" New-Item $WAUClassCmd -Force -ErrorAction SilentlyContinue | Out-Null New-ItemProperty -LiteralPath $WAUClass -Name 'URL Protocol' -Value '' -PropertyType String -Force -ErrorAction SilentlyContinue | Out-Null New-ItemProperty -LiteralPath $WAUClass -Name '(default)' -Value "URL:$($ActionType)" -PropertyType String -Force -ErrorAction SilentlyContinue | Out-Null