Allow specifying custom app installer function

This commit is contained in:
Manuel Thalmann 2023-09-27 12:32:27 +02:00
parent e3a12c0d47
commit 967206e14f
2 changed files with 11 additions and 1 deletions

View file

@ -2,11 +2,17 @@
. "$PSScriptRoot/Drivers.ps1";
. "$PSScriptRoot/../../../scripts/Windows/Scripts/Prerequisites.ps1";
. "$PSScriptRoot/../../../scripts/Windows/Scripts/Context.ps1";
. "$PSScriptRoot/../../../scripts/Windows/Collections/Personal.ps1"
function Initialize-Configuration {
Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" -Name "RealTimeIsUniversal" -Value 1 -Type "DWord";
}
function Restore-Apps {
param([Context] $context)
Restore-PersonalApps $context;
}
Write-Host "Starting Restoration of Windows";
. "$PSScriptRoot/../../../scripts/Windows/OS/Install.ps1";
[Context]$context = [Context]::new();

View file

@ -48,7 +48,11 @@ function Restore-WindowsInstallation([Context] $context) {
Copy-UserInternationalSettingsToSystem -WelcomeScreen $True -NewUser $False;
Restore-PersonalFiles $context;
Restore-PersonalApps $context;
if ((Get-Command Restore-Apps -ErrorAction SilentlyContinue)) {
Restore-Apps $context;
}
Remove-Item -Recurse $context.RootDir;
$context.Cleanup();
}