Better output for DelRegKey()

This commit is contained in:
Yorick Barbanneau 2018-04-11 21:20:35 +02:00
parent 62e6d18efd
commit 186b8b04eb

View file

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