diff --git a/scripts/Windows/OS/User/Add.ps1 b/scripts/Windows/OS/User/Add.ps1 index d5735f6a..8f71dfc7 100644 --- a/scripts/Windows/OS/User/Add.ps1 +++ b/scripts/Windows/OS/User/Add.ps1 @@ -11,7 +11,6 @@ function New-PersonalUser([Context] $context) $userStageProperty = "UserStage"; $null = New-Module { - Get-UserStage { return $context.Get($userStageProperty); } @@ -86,8 +85,8 @@ function Enable-UACNextLogin([Context] $context) { $tempTask = "PortValhalla Temp"; $autoLoginName = "PortValhalla AutoLogin Setup"; $uacDisablerName = "PortValhalla UAC Disabler"; - $autoLoginTrigger = Get-Random -Maximum 65535; - $uacDisablerTrigger = Get-Random -Maximum 65535; + $autoLoginTrigger = Get-Random -Maximum 0xFFFF; + $uacDisablerTrigger = Get-Random -Maximum 0xFFFF; $context.Set($autoLoginTriggerProperty, $autoLoginTrigger, "DWord"); $context.Set($uacDisablerTriggerProperty, $uacDisablerTrigger, "DWord");