From ca5f72720d76c6b29d98e436d637d0e6cc7f9501 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Mon, 26 Mar 2018 10:42:13 +0200 Subject: [PATCH] Variables name corrections in DelRegKey() --- cleanW10.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cleanW10.ps1 b/cleanW10.ps1 index 46bc3ba..bc5bdd3 100755 --- a/cleanW10.ps1 +++ b/cleanW10.ps1 @@ -221,16 +221,16 @@ function DelRegKey { return } try { - Remove-ItemProperty -Path $path -Name $key + Remove-ItemProperty -Path $params.path -Name $params.key Write-host -ForegroundColor Green "done" } catch [System.Security.SecurityException]{ Write-Host -ForegroundColor Red "Error in DelRegKey`n`t" - Write-Host -ForegounndColor DarkRed "Access to $($params.path)\$($params.key) denied" + Write-Host -ForegoundColor DarkRed "Access to $($params.path)\$($params.key) denied" } catch { Write-Host -ForegroundColor Red -NoNewLine "Error in DelRegKey`n`t" - Write-Host -ForegounndColor DarkRed $Error[0].Exception.Message + Write-Host -ForegoundColor DarkRed $Error[0].Exception.Message } }