Fix incorrect default user path

This commit is contained in:
Manuel Thalmann 2023-06-25 17:57:23 +02:00
parent 62968784d4
commit 1843f455e8

View file

@ -66,7 +66,7 @@ class Context {
[void] ProcessDefaultUserKey([System.Action[Microsoft.Win32.RegistryKey]] $action) {
$root = "HKLM:\DefaultUser";
$hivePath = "$env:SystemRoot\Profiles\Default User\NTUSER.dat"
$hivePath = "$env:SystemDrive\Users\Default\NTUSER.dat"
$null = & reg load $root.Replace(":", "") $hivePath;
$action.Invoke((Get-Item $root));
}