Fix resolving of the RunOnce key

This commit is contained in:
Manuel Thalmann 2023-06-25 16:28:12 +02:00
parent df37f30eab
commit a13b9f4cd1

View file

@ -80,7 +80,10 @@ class Context {
$userKey = Get-Item "HKCU:\";
}
return Get-Item "$userKey\Software\Microsoft\Windows\CurrentVersion\RunOnce";
Push-Location $userKey;
$result = Get-Item "$userKey\Software\Microsoft\Windows\CurrentVersion\RunOnce";
Pop-Location;
return $result;
}
[void] RegisterReboot() {