diff --git a/scripts/Windows/Software/LGHub/Manage.ps1 b/scripts/Windows/Software/LGHub/Manage.ps1 index 269d1458..f4ff91fb 100644 --- a/scripts/Windows/Software/LGHub/Manage.ps1 +++ b/scripts/Windows/Software/LGHub/Manage.ps1 @@ -17,7 +17,7 @@ $null = New-Module { $hubName = Get-LogitechGHUBName; $lghubPath = $(Get-Process | Where-Object { [System.IO.Path]::GetFileName($_.Path) -eq $hubName })[0].Path; - $mainProcesses = Get-Process | Where-Object { @($hubName) -contains [System.IO.Path]::GetFileName($_.Path) -and $( + $mainProcesses = Get-Process | Where-Object { @("lghub_agent.exe", $hubName) -contains [System.IO.Path]::GetFileName($_.Path) -and $( $_.Parent.ProcessName -eq "explorer" -or $null -eq $_.Parent) }; $null = $mainProcesses | Foreach-Object { $_.Kill($true) };