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 {