diff --git a/scripts/Windows/Software/LGHub/Manage.ps1 b/scripts/Windows/Software/LGHub/Manage.ps1 index 543369dd..269d1458 100644 --- a/scripts/Windows/Software/LGHub/Manage.ps1 +++ b/scripts/Windows/Software/LGHub/Manage.ps1 @@ -7,7 +7,7 @@ $null = New-Module { [string]$lghubPath; function Get-LogitechGHUBName() { - return "lghub.exe"; + return "lghub_system_tray.exe"; } function Stop-LogitechGHUB() { @@ -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, "lghub_system_tray.exe") -contains [System.IO.Path]::GetFileName($_.Path) -and $( + $mainProcesses = Get-Process | Where-Object { @($hubName) -contains [System.IO.Path]::GetFileName($_.Path) -and $( $_.Parent.ProcessName -eq "explorer" -or $null -eq $_.Parent) }; $null = $mainProcesses | Foreach-Object { $_.Kill($true) };