PortValhalla/scripts/Windows/Software/osu!lazer/Manage.ps1

32 lines
827 B
PowerShell
Raw Normal View History

2024-08-08 02:36:35 +00:00
param(
$Action,
[hashtable] $Arguments
)
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {
$file = "osu!lazer.exe";
$processName = "osu!";
$dir = New-TemporaryDirectory;
Push-Location $dir;
Invoke-WebRequest "https://github.com/ppy/osu/releases/latest/download/install.exe" -OutFile $file;
Start-Process -FilePath $file;
while (-not (Get-Process -ErrorAction SilentlyContinue $processName)) {
Start-Sleep 1;
}
Start-Sleep 10;
Get-Process $processName | Stop-Process -Force;
Pop-Location;
2024-08-08 12:22:22 +00:00
Remove-Item -Recurse $dir;
2024-08-08 02:36:35 +00:00
Remove-DesktopIcon "*osu*";
};
# ToDo: Add restoration