From 7a99482bc821e756a48c8e96708fc77074eb1778 Mon Sep 17 00:00:00 2001
From: Manuel Thalmann <m@nuth.ch>
Date: Fri, 9 Aug 2024 16:02:00 +0200
Subject: [PATCH] Disable boot message only as admin

---
 scripts/Windows/OS/Install.ps1 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1
index 337c65b7..ca9a59dd 100644
--- a/scripts/Windows/OS/Install.ps1
+++ b/scripts/Windows/OS/Install.ps1
@@ -451,7 +451,10 @@ $null = New-Module {
 
                             [string[]] $users = Get-Users;
                             $currentUser = Get-CurrentUser;
-                            Disable-BootMessage;
+
+                            if (Test-Admin) {
+                                Disable-BootMessage;
+                            }
 
                             if ($currentUser -lt $users.Count) {
                                 $user = Get-LocalUser $users[$currentUser];