Updated unload

This commit is contained in:
2023-11-06 13:11:55 +01:00
parent bd7ffb685b
commit d5b9b22345

View File

@@ -86,7 +86,7 @@ function SetupEleveReg {
}
Write-Host "Added registry entries"
Write-Host "Unloading registry HIVE"
Start-Process -FilePath "cmd.exe" -Verb RunAs -ArgumentList "REG UNLOAD HKEY_USERS\$UserSID"
Start-Process cmd -ArgumentList "/c REG UNLOAD HKEY_USERS\$UserSID" -Verb RunAs
} else {
Write-Host "Unable to get the user's HKU registry."
}