This commit is contained in:
2023-11-06 13:56:14 +01:00
parent d95490ac73
commit 01ef027692

View File

@@ -11,7 +11,7 @@ function UserReg {
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 -e 1) {
if ($res -eq 1) {
Write-Host "Failed to load $Username's HKU registry hive."
return $null, $null
}
@@ -89,7 +89,7 @@ function SetupEleveReg {
Write-Host "Unloading registry HIVE"
Write-Host "REG UNLOAD HKEY_USERS\$UserSID"
$res = REG UNLOAD HKEY_USERS\$UserSID
if ($res -e 1) {
if ($res -eq 1) {
Write-Host "Failed to unload $username's HKU registry hive."
}
} else {