Fix incorrect default user path

This commit is contained in:
Manuel Thalmann 2023-06-25 17:57:23 +02:00
parent 294eb7839a
commit 5e27e16a85

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));
}