From 9cd6834819b49e8e104839db71cee0de95bd2191 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 25 Jun 2023 18:11:56 +0200 Subject: [PATCH] Exit script after rebooting --- scripts/Windows/OS/User.ps1 | 1 + scripts/Windows/Scripts/Context.ps1 | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/Windows/OS/User.ps1 b/scripts/Windows/OS/User.ps1 index 8c310693..2c88a14e 100644 --- a/scripts/Windows/OS/User.ps1 +++ b/scripts/Windows/OS/User.ps1 @@ -35,5 +35,6 @@ function New-PersonalUser([Context] $context) Write-Host "Registering setup script for all new users"; $context.RegisterNewUserReboot(); Restart-Computer; + exit; } } diff --git a/scripts/Windows/Scripts/Context.ps1 b/scripts/Windows/Scripts/Context.ps1 index ddef9d24..1b8b7a00 100644 --- a/scripts/Windows/Scripts/Context.ps1 +++ b/scripts/Windows/Scripts/Context.ps1 @@ -114,5 +114,6 @@ class Context { Write-Host "Restarting Computer..."; $this.RegisterReboot(); Restart-Computer; + exit; } }