Better output for DelRegKey()

This commit is contained in:
Yorick Barbanneau 2018-03-28 21:30:29 +02:00
parent c1d3c82c35
commit 47329ea298

View file

@ -276,7 +276,15 @@ function DelRegKey {
return
}
try {
Remove-ItemProperty -Path $params.path -Name $params.key
Get-ItemProperty -Path $params.path -Name $params.key
}
catch {
Write-Host -ForegroundColor Yellow "key already deleted"
return
}
try {
#Remove-ItemProperty -Path $params.path -Name $params.key
Write-host -ForegroundColor Green "done"
}
catch [System.Security.SecurityException]{