Add a script for installing TrackMania Nations

This commit is contained in:
Manuel Thalmann 2023-07-02 13:50:19 +02:00
parent 4388487e13
commit 066d1b50c7
2 changed files with 14 additions and 0 deletions

View file

@ -31,4 +31,5 @@ function Restore-PersonalApps([Context] $context) {
Restore-Nextcloud $context;
Restore-Git $context;
Restore-LogitechGHUB $context;
Restore-TmNations $context;
}

View file

@ -8,4 +8,17 @@ $null = New-Module {
Write-Host "Backing up TrackMania Nations Forever";
$context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`""));
}
function Restore-TmNations([Context] $context) {
$feature = "DirectPlay";
Write-Host "Restoring TrackMania Nations Forever";
if (-not (Get-WindowsOptionalFeature -Online -FeatureName $feature).State) {
Enable-WindowsOptionalFeature -Online -FeatureName $feature;
}
winget install -e --id Nadeo.TrackManiaNationsForever;
Remove-Item "$env:PUBLIC\Desktop\*TmNationsForever*";
$context.Restore($context.SoftwareArchive($softwareName), $path);
}
}