From ec7fc8dd6e62070b909082ee5204ff6d6e76eb08 Mon Sep 17 00:00:00 2001
From: Manuel Thalmann <m@nuth.ch>
Date: Fri, 9 Aug 2024 13:35:12 +0200
Subject: [PATCH] Add a dedicated function for disabling boot message

---
 scripts/Windows/OS/Install.ps1       | 2 +-
 scripts/Windows/Scripts/Registry.ps1 | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1
index e63145ee..50392999 100644
--- a/scripts/Windows/OS/Install.ps1
+++ b/scripts/Windows/OS/Install.ps1
@@ -450,7 +450,7 @@ $null = New-Module {
 
                             [string[]] $users = Get-Users;
                             $currentUser = Get-CurrentUser;
-                            Set-BootMessage;
+                            Disable-BootMessage;
 
                             if ($currentUser -lt $users.Count) {
                                 $user = Get-LocalUser $users[$currentUser];
diff --git a/scripts/Windows/Scripts/Registry.ps1 b/scripts/Windows/Scripts/Registry.ps1
index a18c63aa..2ce9b9e6 100644
--- a/scripts/Windows/Scripts/Registry.ps1
+++ b/scripts/Windows/Scripts/Registry.ps1
@@ -45,4 +45,12 @@ $null = New-Module {
                 -Value ($options[$key]);
         }
     }
+
+    <#
+        .SYNOPSIS
+        Disables the boot message.
+    #>
+    function Disable-BootMessage {
+        Set-BootMessage;
+    }
 }