Variables name corrections in DelRegKey()
This commit is contained in:
parent
3aca7516af
commit
ca5f72720d
1 changed files with 3 additions and 3 deletions
|
@ -221,16 +221,16 @@ function DelRegKey {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
Remove-ItemProperty -Path $path -Name $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]{
|
||||||
Write-Host -ForegroundColor Red "Error in DelRegKey`n`t"
|
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 {
|
catch {
|
||||||
Write-Host -ForegroundColor Red -NoNewLine "Error in DelRegKey`n`t"
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue