Automate Tobii Game Hub installation

This commit is contained in:
Manuel Thalmann 2023-07-17 01:53:36 +02:00
parent c3ea42805e
commit 771502238c
2 changed files with 21 additions and 1 deletions

View file

@ -0,0 +1,16 @@
InstallGameHub()
{
SetTitleMatchMode, RegEx
windowTitle := "^Tobii Game Hub$"
Run, "setup.exe",,,pid
WinWait % windowTitle,, 60
WinActivate % windowTitle
MouseClick, Left, 485, 365
MouseClick, Left, 600, 455
MouseClick, Left, 533, 623
MouseClick, Left, 936, 662
Process, Close, %pid%
}
InstallGameHub()

View file

@ -20,7 +20,11 @@ Write-Information "Running Tobii Ghost installer";
Start-Process -Wait -FilePath "$PSScriptRoot/Ghost.ahk";
Write-Host "Installing Tobii Game Hub";
Install-SoftwarePackage $context "https://files.update.oem.tobii.com/GameHub/TobiiGameHub.3.0.1-Setup.exe";
Write-Information "Downloading Tobii Game Hub installer";
Invoke-WebRequest "https://files.update.oem.tobii.com/GameHub/TobiiGameHub.3.0.1-Setup.exe" -OutFile $installer;
Write-Information "Running Tobii Game Hub installer";
Start-Process -Wait -FilePath "$PSScriptRoot/GameHub.ahk";
Pop-Location;
Remove-Item -Recurse $tempDir;