Add script for restoring putty
This commit is contained in:
parent
e416032f28
commit
8dadaa875a
2 changed files with 14 additions and 0 deletions
|
@ -36,4 +36,5 @@ function Restore-PersonalApps([Context] $context) {
|
||||||
Restore-ManiaPlanet $context;
|
Restore-ManiaPlanet $context;
|
||||||
Restore-Osu $context;
|
Restore-Osu $context;
|
||||||
Restore-OsuLazer $context;
|
Restore-OsuLazer $context;
|
||||||
|
Restore-PuTTY $context;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,4 +12,17 @@ $null = New-Module {
|
||||||
$context.Backup($tempDir, $context.SoftwareArchive($softwareName), @());
|
$context.Backup($tempDir, $context.SoftwareArchive($softwareName), @());
|
||||||
Remove-Item -Recurse $tempDir;
|
Remove-Item -Recurse $tempDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Restore-PuTTY([Context] $context) {
|
||||||
|
Write-Host "Restoring PuTTY";
|
||||||
|
Write-Information "Installing PuTTY";
|
||||||
|
choco install -y putty;
|
||||||
|
|
||||||
|
Write-Information "Restoring configuration";
|
||||||
|
$tempDir = $context.GetTempDirectory();
|
||||||
|
$fileName = Join-Path "$tempDir" $configFile;
|
||||||
|
$context.Restore($context.SoftwareArchive($softwareName), $tempDir);
|
||||||
|
& reg import "$fileName" /y;
|
||||||
|
Remove-Item -Recurse $tempDir;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue