From e571f6fa18d05a79525b9f2e93e688c13be29851 Mon Sep 17 00:00:00 2001 From: Lightemerald Date: Mon, 6 Nov 2023 13:22:16 +0100 Subject: [PATCH] Test --- setupReg.ps1 | 2 ++ 1 file changed, 2 insertions(+) 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."