diff --git a/scripts/Windows/Drivers/Tobii EyeX/GameHub.ahk b/scripts/Windows/Drivers/Tobii EyeX/GameHub.ahk index 68131689..5b05c43f 100644 --- a/scripts/Windows/Drivers/Tobii EyeX/GameHub.ahk +++ b/scripts/Windows/Drivers/Tobii EyeX/GameHub.ahk @@ -3,14 +3,17 @@ InstallGameHub() SetTitleMatchMode, RegEx windowTitle := "^Tobii Game Hub$" - Run, "setup.exe",,,pid + Run, "setup.exe" WinWait % windowTitle,, 60 WinActivate % windowTitle MouseClick, Left, 485, 365 MouseClick, Left, 600, 455 MouseClick, Left, 533, 623 MouseClick, Left, 936, 662 - Process, Close, %pid% + Sleep, 10 * 1000 + WinActivate % windowTitle + WinGet, pid, PID + Run, pwsh -c "Stop-Process -Force %pid%" } InstallGameHub() diff --git a/scripts/Windows/Drivers/Tobii EyeX/Ghost.ahk b/scripts/Windows/Drivers/Tobii EyeX/Ghost.ahk index 3969eb8b..3a9651c0 100644 --- a/scripts/Windows/Drivers/Tobii EyeX/Ghost.ahk +++ b/scripts/Windows/Drivers/Tobii EyeX/Ghost.ahk @@ -3,7 +3,7 @@ InstallGhost() SetTitleMatchMode, RegEx windowTitle := "^Tobii Ghost$" - Run, "setup.exe",,,pid + Run, "setup.exe" WinWait % windowTitle,, 60 WinActivate % windowTitle MouseClick, Left, 44, 694 @@ -13,7 +13,9 @@ InstallGhost() MouseClick, Left, 563, 397 MouseClick, Left, 650, 497 Sleep, 10 * 1000 - Process, Close, %pid% + WinActivate % windowTitle + WinGet, pid, PID + Run, pwsh -c "Stop-Process -Force %pid%" } InstallGhost() diff --git a/scripts/Windows/Drivers/Tobii EyeX/Install.ps1 b/scripts/Windows/Drivers/Tobii EyeX/Install.ps1 index 4cbf2d58..0e56852d 100644 --- a/scripts/Windows/Drivers/Tobii EyeX/Install.ps1 +++ b/scripts/Windows/Drivers/Tobii EyeX/Install.ps1 @@ -18,6 +18,7 @@ Invoke-WebRequest "https://files.update.oem.tobii.com/Ghost/TobiiGhost.1.14.1-Se Write-Information "Running Tobii Ghost installer"; Start-Process -Wait -FilePath "$PSScriptRoot/Ghost.ahk"; +Stop-Process -Force "TobiiGhost.exe"; Write-Host "Installing Tobii Game Hub"; Write-Information "Downloading Tobii Game Hub installer"; @@ -25,6 +26,7 @@ Invoke-WebRequest "https://files.update.oem.tobii.com/GameHub/TobiiGameHub.3.0.1 Write-Information "Running Tobii Game Hub installer"; Start-Process -Wait -FilePath "$PSScriptRoot/GameHub.ahk"; +Stop-Process -Force "TobiiGameHub.exe"; Pop-Location; Remove-Item -Recurse $tempDir;