diff --git a/functions/private/Invoke-WinUtilCurrentSystem.ps1 b/functions/private/Invoke-WinUtilCurrentSystem.ps1 index 6612e561..556288ce 100644 --- a/functions/private/Invoke-WinUtilCurrentSystem.ps1 +++ b/functions/private/Invoke-WinUtilCurrentSystem.ps1 @@ -26,8 +26,12 @@ Function Invoke-WinUtilCurrentSystem { $filter = Get-WinUtilVariables -Type Checkbox | Where-Object {$psitem -like "WPFInstall*"} $sync.GetEnumerator() | Where-Object {$psitem.Key -in $filter} | ForEach-Object { - if($sync.configs.applications.$($psitem.Key).winget -in $sync.InstalledPrograms.Id){ - Write-Output $psitem.name + $dependencies = $($sync.configs.applications.$($psitem.Key).winget -split ";") + + Foreach ($dependency in $dependencies) { + if($dependency -in $sync.InstalledPrograms.Id){ + Write-Output $psitem.name + } } } } diff --git a/winutil.ps1 b/winutil.ps1 index a213dffd..28e36cc3 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -367,8 +367,12 @@ Function Invoke-WinUtilCurrentSystem { $filter = Get-WinUtilVariables -Type Checkbox | Where-Object {$psitem -like "WPFInstall*"} $sync.GetEnumerator() | Where-Object {$psitem.Key -in $filter} | ForEach-Object { - if($sync.configs.applications.$($psitem.Key).winget -in $sync.InstalledPrograms.Id){ - Write-Output $psitem.name + $dependencies = $($sync.configs.applications.$($psitem.Key).winget -split ";") + + Foreach ($dependency in $dependencies) { + if($dependency -in $sync.InstalledPrograms.Id){ + Write-Output $psitem.name + } } } }