Fix
This commit is contained in:
@@ -11,7 +11,7 @@ function UserReg {
|
|||||||
if( -not (Test-Path -Path "Registry::HKEY_USERS\$UserSID" -PathType Container) ) {
|
if( -not (Test-Path -Path "Registry::HKEY_USERS\$UserSID" -PathType Container) ) {
|
||||||
Write-Host "REG LOAD HKEY_USERS\$UserSID C:\Users\$Username\NTUSER.DAT"
|
Write-Host "REG LOAD HKEY_USERS\$UserSID C:\Users\$Username\NTUSER.DAT"
|
||||||
$res = 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."
|
Write-Host "Failed to load $Username's HKU registry hive."
|
||||||
return $null, $null
|
return $null, $null
|
||||||
}
|
}
|
||||||
@@ -89,7 +89,7 @@ function SetupEleveReg {
|
|||||||
Write-Host "Unloading registry HIVE"
|
Write-Host "Unloading registry HIVE"
|
||||||
Write-Host "REG UNLOAD HKEY_USERS\$UserSID"
|
Write-Host "REG UNLOAD HKEY_USERS\$UserSID"
|
||||||
$res = 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."
|
Write-Host "Failed to unload $username's HKU registry hive."
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user