Allow driver installation during setup
This commit is contained in:
parent
feed405e65
commit
629978a897
2 changed files with 17 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
#!/bin/pwsh
|
||||
. "$PSScriptRoot/Drivers.ps1";
|
||||
. "$PSScriptRoot/../../../scripts/Windows/Scripts/Prerequisites.ps1";
|
||||
. "$PSScriptRoot/../../../scripts/Windows/Scripts/Context.ps1";
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/pwsh
|
||||
. "$PSScriptRoot/Drivers.ps1";
|
||||
. "$PSScriptRoot/Manage.ps1";
|
||||
. "$PSScriptRoot/Upgrade.ps1";
|
||||
. "$PSScriptRoot/User.ps1";
|
||||
|
@ -9,6 +10,21 @@ function Invoke-WindowsInstallation([Context] $context)
|
|||
Write-Host "Starting Installation and Restoration of Windows";
|
||||
. "$PSScriptRoot/../Scripts/Prerequisites.ps1";
|
||||
Update-WindowsInstallation $context;
|
||||
|
||||
|
||||
if (-not $context.Get("DriversInstalled")) {
|
||||
Write-Host "Installing Drivers";
|
||||
Write-Information "Looking for driver installation function";
|
||||
|
||||
if ((Get-Command Install-Drivers -ErrorAction SilentlyContinue)) {
|
||||
Write-Information "Driver installation function was found. Starting installation";
|
||||
Install-Drivers $context;
|
||||
}
|
||||
|
||||
Write-Information "Finished installing drivers";
|
||||
$context.Set("DriversInstalled", 1);
|
||||
}
|
||||
|
||||
New-PersonalUser $context;
|
||||
Restore-WindowsInstallation $context;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue