Fix incorrect order of code statements

This commit is contained in:
Manuel Thalmann 2023-07-29 03:25:47 +02:00
parent ec057db9ef
commit 9c02d8913f

View file

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