PortValhalla/scripts/Windows/Software/tm-united-forever/Main.ps1

22 lines
746 B
PowerShell
Raw Normal View History

2024-09-24 16:15:06 +00:00
. "$PSScriptRoot/Manage.ps1";
2024-11-01 12:12:16 +00:00
. "$PSScriptRoot/../../../lib/Software.ps1";
2024-09-24 16:15:06 +00:00
$parameters = Get-TMForeverInstallerComponents `
-IconName "TmUnitedForever" `
-UserDirectory "$HOME/Documents/TrackMania" `
-Installer {
$file = "TmUnitedForever.exe";
$dir = New-TemporaryDirectory;
$null = Push-Location $dir;
Write-Host "Downloading TrackMania United Forever…";
Invoke-WebRequest "http://files.trackmaniaforever.com/tmunitedforever_setup.exe" -OutFile "$file";
Write-Host "Starting installation…";
Start-Process -Wait -FilePath "$file" -ArgumentList "/Silent";
$null = Pop-Location;
Remove-Item -Recurse $dir;
};
2024-09-30 03:00:20 +00:00
Start-SoftwareInstaller @args @parameters;