From e7ced15185c5e1bd0d85ebb06b1aa4aeb3aced80 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 5 Aug 2024 22:45:17 +0200 Subject: [PATCH] Fix non-functioning script --- scripts/Windows/Scripts/Software.ps1 | 2 +- scripts/Windows/Software/Windows/Manage.ps1 | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/Windows/Scripts/Software.ps1 b/scripts/Windows/Scripts/Software.ps1 index 13eb8bf1..39f9ed41 100644 --- a/scripts/Windows/Scripts/Software.ps1 +++ b/scripts/Windows/Scripts/Software.ps1 @@ -31,7 +31,7 @@ $null = New-Module { [hashtable] $Arguments ) - $argumentList = { + $argumentList = @{ installer = $installHandler; arguments = $Arguments; }; diff --git a/scripts/Windows/Software/Windows/Manage.ps1 b/scripts/Windows/Software/Windows/Manage.ps1 index 2c2cc509..429ba0b7 100644 --- a/scripts/Windows/Software/Windows/Manage.ps1 +++ b/scripts/Windows/Software/Windows/Manage.ps1 @@ -57,7 +57,7 @@ Start-SoftwareInstaller @PSBoundParameters ` ) $path = "$($Key.PSPath)\Software\Microsoft\Lighting"; - New-Item $path; + $null = New-Item $path; Set-ItemProperty $path -Name "AmbientLightingEnabled" -Value 0 -Type "DWord"; }; } @@ -75,9 +75,9 @@ Start-SoftwareInstaller @PSBoundParameters ` $contentDeliveryKey = "$winKey\ContentDeliveryManager"; $cloudContentKey = "HKLM:\Software\Policies\Microsoft\Windows\CloudContent"; - foreach ($key in @($contentDeliveryKey, $cloudContentKey)) { - if (-not (Test-Path $key)) { - $null = New-Item $key; + foreach ($path in @($contentDeliveryKey, $cloudContentKey)) { + if (-not (Test-Path $path)) { + $null = New-Item $path; } }