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) {
|
2023-06-16 18:25:43 +00:00
|
|
|
$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), @());
|
2023-06-16 18:25:43 +00:00
|
|
|
Remove-Item -Recurse $tempDir;
|
2023-06-08 00:28:33 +00:00
|
|
|
}
|
2023-06-07 19:57:00 +00:00
|
|
|
}
|