Try automating osu!lazer installer
This commit is contained in:
parent
e64de7147a
commit
c02dc0816a
1 changed files with 11 additions and 1 deletions
|
@ -16,10 +16,20 @@ $null = New-Module {
|
||||||
Write-Information "Installing osu!lazer";
|
Write-Information "Installing osu!lazer";
|
||||||
|
|
||||||
$installerName = "osu!lazer.exe";
|
$installerName = "osu!lazer.exe";
|
||||||
|
$processName = "osu!";
|
||||||
$tempDir = $context.GetTempDirectory();
|
$tempDir = $context.GetTempDirectory();
|
||||||
Push-Location $tempDir;
|
Push-Location $tempDir;
|
||||||
Invoke-WebRequest "https://github.com/ppy/osu/releases/latest/download/install.exe" -OutFile $installerName;
|
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*";
|
Remove-Item "~\Desktop\*osu*";
|
||||||
Pop-Location;
|
Pop-Location;
|
||||||
Remove-Item -Recurse $tempDir;
|
Remove-Item -Recurse $tempDir;
|
||||||
|
|
Loading…
Reference in a new issue