Fix non-functioning script

This commit is contained in:
Manuel Thalmann 2024-08-05 22:45:17 +02:00
parent 633df57fee
commit 290b9a3611
2 changed files with 5 additions and 5 deletions

View file

@ -31,7 +31,7 @@ $null = New-Module {
[hashtable] $Arguments
)
$argumentList = {
$argumentList = @{
installer = $installHandler;
arguments = $Arguments;
};

View file

@ -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;
}
}