PortValhalla/scripts/Windows/Software/PuTTY/Manage.ps1

15 lines
486 B
PowerShell
Raw Normal View History

2023-06-07 19:57:00 +00:00
. "$PSScriptRoot/../../Scripts/Context.ps1";
2023-06-08 00:28:33 +00:00
$null = New-Module {
$softwareName = "PuTTY";
$configFile = "$($softwareName).reg";
2023-06-30 10:19:54 +00:00
function Backup-PuTTY([Context] $context) {
$tempDir = $context.GetTempDirectory();
2023-06-08 00:28:33 +00:00
$fileName = Join-Path "$tempDir" $configFile;
& reg export "HKCU\Software\SimonTatham" "$fileName" /y;
$context.Backup($tempDir, $context.SoftwareArchive($softwareName), @());
Remove-Item -Recurse $tempDir;
2023-06-08 00:28:33 +00:00
}
2023-06-07 19:57:00 +00:00
}