Variables name corrections in DelRegKey()

This commit is contained in:
Yorick Barbanneau 2018-03-26 10:42:13 +02:00
parent 3aca7516af
commit ca5f72720d

View file

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