diff --git a/setupReg.ps1 b/setupReg.ps1 index 745e2ed..4c047f6 100644 --- a/setupReg.ps1 +++ b/setupReg.ps1 @@ -9,6 +9,7 @@ function UserReg { if ($null -ne $UserProfile) { $UserSID = $UserProfile.SID if( -not (Test-Path -Path "Registry::HKEY_USERS\$UserSID" -PathType Container) ) { + Write-Host "REG LOAD HKEY_USERS\$UserSID C:\Users\$Username\NTUSER.DAT" $res = REG LOAD HKEY_USERS\$UserSID "C:\Users\$Username\NTUSER.DAT" if ($res -ne 0) { Write-Host "Failed to load $Username's HKU registry hive." @@ -86,6 +87,7 @@ function SetupEleveReg { } Write-Host "Added registry entries" Write-Host "Unloading registry HIVE" + Write-Host "REG UNLOAD HKEY_USERS\$UserSID" $res = REG UNLOAD HKEY_USERS\$UserSID if ($res -ne 0) { Write-Host "Failed to unload $username's HKU registry hive."