mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-02-04 15:00:09 +00:00
Fixes to Get installed tweaks does not handle <RemoveEntry> value (#3892)
This commit is contained in:
@@ -64,7 +64,11 @@ Function Invoke-WinUtilCurrentSystem {
|
|||||||
if(test-path $tweak.Path) {
|
if(test-path $tweak.Path) {
|
||||||
$actualValue = Get-ItemProperty -Name $tweak.Name -Path $tweak.Path -ErrorAction SilentlyContinue | Select-Object -ExpandProperty $($tweak.Name)
|
$actualValue = Get-ItemProperty -Name $tweak.Name -Path $tweak.Path -ErrorAction SilentlyContinue | Select-Object -ExpandProperty $($tweak.Name)
|
||||||
$expectedValue = $tweak.Value
|
$expectedValue = $tweak.Value
|
||||||
if ($expectedValue -notlike $actualValue) {
|
if ($expectedValue -eq "<RemoveEntry>") {
|
||||||
|
if ($null -ne $actualValue) {
|
||||||
|
$values += $False
|
||||||
|
}
|
||||||
|
} elseif ($expectedValue -notlike $actualValue) {
|
||||||
$values += $False
|
$values += $False
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user