Try automating osu!lazer installer

This commit is contained in:
Manuel Thalmann 2023-07-12 18:23:59 +02:00
parent be68e8363a
commit 2a65445e5a

View file

@ -16,10 +16,20 @@ $null = New-Module {
Write-Information "Installing osu!lazer";
$installerName = "osu!lazer.exe";
$processName = "osu!";
$tempDir = $context.GetTempDirectory();
Push-Location $tempDir;
Invoke-WebRequest "https://github.com/ppy/osu/releases/latest/download/install.exe" -OutFile $installerName;
Start-Process -Wait -FilePath $installerName;
$process = Start-Process -FilePath $installerName;
while (-not (Get-Process -ErrorAction "SilentlyContinue" $processName)) {
Start-Sleep 1;
}
Start-Sleep 10;
Get-Process $processName | Stop-Process -Force;
Wait-Process $process;
Remove-Item "~\Desktop\*osu*";
Pop-Location;
Remove-Item -Recurse $tempDir;