From 1df18e7643e0c43dff5eaa2754246f6ce8f5a102 Mon Sep 17 00:00:00 2001 From: MyDrift Date: Sun, 3 Nov 2024 21:45:14 +0100 Subject: [PATCH] add proper console log --- functions/private/Set-WinUtilRegistry.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions/private/Set-WinUtilRegistry.ps1 b/functions/private/Set-WinUtilRegistry.ps1 index d2141800..cc81e1c8 100644 --- a/functions/private/Set-WinUtilRegistry.ps1 +++ b/functions/private/Set-WinUtilRegistry.ps1 @@ -35,11 +35,12 @@ function Set-WinUtilRegistry { New-Item -Path $Path -Force -ErrorAction Stop | Out-Null } - Write-Host "Set $Path\$Name to $Value" if ($Value -ne "") { + Write-Host "Set $Path\$Name to $Value" Set-ItemProperty -Path $Path -Name $Name -Type $Type -Value $Value -Force -ErrorAction Stop | Out-Null } else{ + Write-Host "Remove $Path\$Name" Remove-ItemProperty -Path $Path -Name $Name -Force -ErrorAction Stop | Out-Null } } catch [System.Security.SecurityException] {