Fix incorrect order of code statements

This commit is contained in:
Manuel Thalmann 2023-07-29 03:25:47 +02:00
parent e47ae3690e
commit 466ec46bcc

View file

@ -385,8 +385,8 @@ class Context {
$this.DeregisterNewUserReboot();
$this.RemoveAutologin();
$this.SetUACState($true);
Remove-Item $($this.EnsureConfigKey().PSPath);
$originalScheme = $this.Get("Power Scheme");
Remove-Item $($this.EnsureConfigKey().PSPath);
if ($originalScheme) {
Write-Information "Reset power plan to original state";