Perform initial configuration before anything else

This commit is contained in:
Manuel Thalmann 2023-07-19 01:16:25 +02:00
parent 2594791471
commit dffb937078
2 changed files with 5 additions and 6 deletions

View file

@ -7,14 +7,11 @@
function Invoke-WindowsInstallation([Context] $context)
{
Write-Host "Starting Installation and Restoration of Windows";
. "$PSScriptRoot/../Scripts/Prerequisites.ps1";
Update-WindowsInstallation $context;
if (-not $context.Get("InitialConfiguration")) {
$configPath = "$PSScriptRoot/../Config";
Enable-WindowsOptionalFeature -Online -All -FeatureName "NetFx3";
powershell -c Install-PackageProvider -Name NuGet -Force;
. "$configPath/Windows/Install.ps1" $context;
. "$configPath/Explorer/Install.ps1" $context;
@ -24,6 +21,10 @@ function Invoke-WindowsInstallation([Context] $context)
$context.Set("InitialConfiguration", 1, "DWord");
}
Write-Host "Starting Installation and Restoration of Windows";
. "$PSScriptRoot/../Scripts/Prerequisites.ps1";
Update-WindowsInstallation $context;
if (-not $context.Get("SoftwarePrerequisitesInstalled")) {
Write-Host "Installing prerequisites for installing software";

View file

@ -1,6 +1,4 @@
#!/bin/pwsh
powershell -c Install-PackageProvider -Name NuGet -Force;
foreach ($module in @("PSWindowsUpdate", "KnownFolders"))
{
if (-not (Get-Module -ListAvailable $module))