Better output for DelRegKey()
This commit is contained in:
parent
62e6d18efd
commit
186b8b04eb
1 changed files with 2 additions and 2 deletions
|
@ -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]{
|
||||||
|
|
Reference in a new issue