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

14 lines
488 B
PowerShell

. "$PSScriptRoot/../../Scripts/Context.ps1";
$null = New-Module {
$softwareName = "PuTTY";
$configFile = "$($softwareName).reg";
function Invoke-BackupPuTTY([Context] $context) {
$tempDir = $context.GetTempDirectory();
$fileName = Join-Path "$tempDir" $configFile;
& reg export "HKCU\Software\SimonTatham" "$fileName" /y;
$context.Backup($tempDir, $context.SoftwareArchive($softwareName), @());
Remove-Item -Recurse $tempDir;
}
}