From 01ef0276929d5112fcaf35687a462bda3a1fcae6 Mon Sep 17 00:00:00 2001 From: Lightemerald Date: Mon, 6 Nov 2023 13:56:14 +0100 Subject: [PATCH] Fix --- setupReg.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setupReg.ps1 b/setupReg.ps1 index 426a012..abe97ad 100644 --- a/setupReg.ps1 +++ b/setupReg.ps1 @@ -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 {