diff --git a/Winget-AutoUpdate/mods/_Mods-Functions.ps1 b/Winget-AutoUpdate/mods/_Mods-Functions.ps1 index ec00209..607d3d0 100644 --- a/Winget-AutoUpdate/mods/_Mods-Functions.ps1 +++ b/Winget-AutoUpdate/mods/_Mods-Functions.ps1 @@ -173,7 +173,7 @@ function Add-ModsReg ($AddKey, $AddValue, $AddTypeData, $AddType) { } function Remove-ModsReg ($DelKey, $DelValue) { - if ("$DelKey" -like "HKEY_LOCAL_MACHINE*") { + if ($DelKey -like "HKEY_LOCAL_MACHINE*") { $DelKey = $DelKey.replace("HKEY_LOCAL_MACHINE","HKLM:") } if (Test-Path "$DelKey") {