From 9de3de5bb2bfc64960496b9b77852369ee7dfd48 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 10 Aug 2024 15:15:40 +0200 Subject: [PATCH] Fix broken redirection of arguments --- scripts/Windows/Drivers/Tobii EyeX/Manage.ps1 | 12 +++++++----- scripts/Windows/Software/VisualStudio/Manage.ps1 | 8 +++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/scripts/Windows/Drivers/Tobii EyeX/Manage.ps1 b/scripts/Windows/Drivers/Tobii EyeX/Manage.ps1 index 68422203..1e309469 100644 --- a/scripts/Windows/Drivers/Tobii EyeX/Manage.ps1 +++ b/scripts/Windows/Drivers/Tobii EyeX/Manage.ps1 @@ -3,7 +3,9 @@ param( [hashtable] $Arguments ) -$null = New-Module { +& { + param($parameters); + . "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; $softwarePath = "$PSScriptRoot/../../Software"; @@ -12,17 +14,17 @@ $null = New-Module { "$softwarePath/TobiiGameHub/Manage.ps1" ); - Start-SoftwareInstaller @PSBoundParameters ` + Start-SoftwareInstaller @parameters ` -Installer { Install-SetupPackage -Source "https://files.update.tech.tobii.com/Tobii_Eye_Tracking_Core_v2.16.8.214_x86.exe"; foreach ($script in $appScripts) { - . $script @PSBoundParameters; + . $script @parameters; } } ` -UserConfigurator { foreach ($script in $appScripts) { - . $script @PSBoundParameters; + . $script @parameters; } }; -}; +} $PSBoundParameters; diff --git a/scripts/Windows/Software/VisualStudio/Manage.ps1 b/scripts/Windows/Software/VisualStudio/Manage.ps1 index e95b6163..53ea48c9 100644 --- a/scripts/Windows/Software/VisualStudio/Manage.ps1 +++ b/scripts/Windows/Software/VisualStudio/Manage.ps1 @@ -3,7 +3,9 @@ param( [hashtable] $Arguments ) -$null = New-Module { +& { + param($parameters) + . "$PSScriptRoot/../../../Common/Scripts/BrowserAutomation.ps1"; . "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; . "$PSScriptRoot/../../../Common/Scripts/System.ps1"; @@ -15,7 +17,7 @@ $null = New-Module { [System.Tuple]::Create("visualstudio2022community", "VisualStudio.17.Release", "Microsoft.VisualStudio.Product.Community") ); - Start-SoftwareInstaller @PSBoundParameters ` + Start-SoftwareInstaller @parameters ` -Installer { foreach ($version in $versions) { $packageName = $version[0]; @@ -29,4 +31,4 @@ $null = New-Module { # ToDo: Add restoration # Only restore version if it has been backed up -}; +} $PSBoundParameters;