Fix key name for reg load

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

View file

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