mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-31 18:24:27 -06:00
add proper console log
This commit is contained in:
parent
85cda04a6c
commit
1df18e7643
@ -35,11 +35,12 @@ function Set-WinUtilRegistry {
|
|||||||
New-Item -Path $Path -Force -ErrorAction Stop | Out-Null
|
New-Item -Path $Path -Force -ErrorAction Stop | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Set $Path\$Name to $Value"
|
|
||||||
if ($Value -ne "<RemoveEntry>") {
|
if ($Value -ne "<RemoveEntry>") {
|
||||||
|
Write-Host "Set $Path\$Name to $Value"
|
||||||
Set-ItemProperty -Path $Path -Name $Name -Type $Type -Value $Value -Force -ErrorAction Stop | Out-Null
|
Set-ItemProperty -Path $Path -Name $Name -Type $Type -Value $Value -Force -ErrorAction Stop | Out-Null
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
Write-Host "Remove $Path\$Name"
|
||||||
Remove-ItemProperty -Path $Path -Name $Name -Force -ErrorAction Stop | Out-Null
|
Remove-ItemProperty -Path $Path -Name $Name -Force -ErrorAction Stop | Out-Null
|
||||||
}
|
}
|
||||||
} catch [System.Security.SecurityException] {
|
} catch [System.Security.SecurityException] {
|
||||||
|
Loading…
Reference in New Issue
Block a user