From 451b7a21e6199180f6baedb0f9eefc75bea32566 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 9 Aug 2024 14:45:29 +0200 Subject: [PATCH] Allow automatic script execution for MS accounts --- scripts/Windows/OS/Install.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index c71e7356..5b8a3690 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -3,6 +3,7 @@ using namespace System.Security.Principal; . "$PSScriptRoot/../../../scripts/Windows/Scripts/Prerequisites.ps1"; . "$PSScriptRoot/../../Common/Scripts/Context.ps1"; +. "$PSScriptRoot/../Scripts/Security.ps1"; . "$PSScriptRoot/../Software/Firefox/Install.ps1"; . "$PSScriptRoot/Manage.ps1"; . "$PSScriptRoot/User/Install.ps1"; @@ -464,13 +465,14 @@ $null = New-Module { Enable-LocalUser $user; if (Get-UserConfig -UserName "$user" -Name "microsoftAccount") { + Enable-UAC; Disable-Autologin; Set-BootMessage -Caption "Login" -Message "Please login using your account."; } else { Set-AutologinUser "$user"; } - Restart-Intermediate + Restart-Intermediate -DefaultUser; return; } }