Set proper boundaries for event numbers

This commit is contained in:
Manuel Thalmann 2023-06-30 03:40:04 +02:00
parent 3299ff78c0
commit a122795f38

View file

@ -78,8 +78,8 @@ function Set-UACState([bool] $value) {
function Enable-UACNextLogin([Context] $context) {
Set-UACState $true;
$tempTask = "PortValhalla Temp";
$autoLoginTrigger = Get-Random;
$uacDisablerTrigger = Get-Random;
$autoLoginTrigger = Get-Random -Maximum 65535;
$uacDisablerTrigger = Get-Random -Maximum 65535;
$key = Get-SystemPolicyKey;
$context.Set($autoLoginTriggerProperty, $autoLoginTrigger, "DWord");