Install missing features for TrackMania
This commit is contained in:
parent
f603b690a4
commit
1b491e1d23
2 changed files with 12 additions and 7 deletions
|
@ -10,12 +10,14 @@ $null = New-Module {
|
|||
}
|
||||
|
||||
function Restore-TmNations([Context] $context) {
|
||||
$feature = "DirectPlay";
|
||||
$features = @("DirectPlay", "NetFx3");
|
||||
Write-Host "Restoring TrackMania Nations Forever";
|
||||
|
||||
if (-not (Get-WindowsOptionalFeature -Online -FeatureName $feature).State) {
|
||||
Write-Information "Enabling the ``$feature`` feature";
|
||||
Enable-WindowsOptionalFeature -Online -All -FeatureName $feature;
|
||||
foreach ($feature in $features) {
|
||||
if (-not (Get-WindowsOptionalFeature -Online -FeatureName $feature).State) {
|
||||
Write-Information "Enabling the ``$feature`` feature";
|
||||
Enable-WindowsOptionalFeature -Online -All -FeatureName $feature;
|
||||
}
|
||||
}
|
||||
|
||||
Write-Information "Installing TrackMania Nations Forever";
|
||||
|
|
|
@ -10,11 +10,14 @@ $null = New-Module {
|
|||
}
|
||||
|
||||
function Restore-TmUnited([Context] $context) {
|
||||
$feature = "DirectPlay";
|
||||
$features = @("DirectPlay", "NetFx3");
|
||||
Write-Host "Restoring TrackMania United Forever";
|
||||
|
||||
if (-not (Get-WindowsOptionalFeature -Online -FeatureName $feature).State) {
|
||||
Enable-WindowsOptionalFeature -Online -All -FeatureName $feature;
|
||||
foreach ($feature in $features) {
|
||||
if (-not (Get-WindowsOptionalFeature -Online -FeatureName $feature).State) {
|
||||
Write-Information "Enabling the ``$feature`` feature";
|
||||
Enable-WindowsOptionalFeature -Online -All -FeatureName $feature;
|
||||
}
|
||||
}
|
||||
|
||||
Write-Information "Determining location of setup file";
|
||||
|
|
Loading…
Reference in a new issue