Update code accordingly

This commit is contained in:
Manuel Thalmann 2024-03-24 01:10:44 +01:00
parent f91980ce9a
commit fed96c7cdf
2 changed files with 4 additions and 4 deletions

View file

@ -154,8 +154,8 @@ function Enable-PersonalUserAutologon([Context] $context, [string] $userName)
} }
} }
$context.Set($preparedUsernameProperty, $userName, "ExpandString"); $context.Set($preparedUsernameProperty, $userName);
$context.Set($preparedPasswordProperty, $password, "ExpandString"); $context.Set($preparedPasswordProperty, $password);
Start-EventDrivenTask $context.Get($autoLoginTriggerProperty); Start-EventDrivenTask $context.Get($autoLoginTriggerProperty);
} }

View file

@ -117,7 +117,7 @@ class Context {
} }
[void] SetStage([string] $name) { [void] SetStage([string] $name) {
$this.Set($this.StagePropertyName, $name, "ExpandString"); $this.Set($this.StagePropertyName, $name);
} }
[string] GetStage() { [string] GetStage() {
@ -393,7 +393,7 @@ class Context {
if ($currentScheme -ne $performanceScheme) { if ($currentScheme -ne $performanceScheme) {
Write-Information "Disabling Power Save mode"; Write-Information "Disabling Power Save mode";
$this.Set("Power Scheme", $currentScheme, "ExpandString"); $this.Set("Power Scheme", $currentScheme);
powercfg /S 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c; powercfg /S 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c;
} }
} }