Add a script for installing TrackMania Nations
This commit is contained in:
parent
f58ce2bfe9
commit
7275419c1a
2 changed files with 14 additions and 0 deletions
|
@ -31,4 +31,5 @@ function Restore-PersonalApps([Context] $context) {
|
||||||
Restore-Nextcloud $context;
|
Restore-Nextcloud $context;
|
||||||
Restore-Git $context;
|
Restore-Git $context;
|
||||||
Restore-LogitechGHUB $context;
|
Restore-LogitechGHUB $context;
|
||||||
|
Restore-TmNations $context;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,4 +8,17 @@ $null = New-Module {
|
||||||
Write-Host "Backing up TrackMania Nations Forever";
|
Write-Host "Backing up TrackMania Nations Forever";
|
||||||
$context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`""));
|
$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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue