Fix resolving of the RunOnce key

This commit is contained in:
Manuel Thalmann 2023-06-25 16:28:12 +02:00
parent 1e62f6f9de
commit 87d7aa36c0

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() {