mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-29 01:11:30 -06:00
Compare commits
2 Commits
e4ff1f8a7f
...
ff6fe4978a
Author | SHA1 | Date | |
---|---|---|---|
|
ff6fe4978a | ||
|
1df18e7643 |
@ -35,11 +35,12 @@ function Set-WinUtilRegistry {
|
||||
New-Item -Path $Path -Force -ErrorAction Stop | Out-Null
|
||||
}
|
||||
|
||||
Write-Host "Set $Path\$Name to $Value"
|
||||
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
|
||||
}
|
||||
else{
|
||||
Write-Host "Remove $Path\$Name"
|
||||
Remove-ItemProperty -Path $Path -Name $Name -Force -ErrorAction Stop | Out-Null
|
||||
}
|
||||
} catch [System.Security.SecurityException] {
|
||||
|
Loading…
Reference in New Issue
Block a user