Unable to load ntuser.dat for a currently non-logged user
367
The problem is that you are attempting to mount the LOG file. You need to mount ntuser.dat
, not ntuser.dat.log
.
Like you said above, you were able to mount the hive successfully, so there’s no problem; there is no problem with the log file being empty, it just means that pending registry changes were flushed to the hive when you last shut down. [1][2][3][4]
Also, I prefer the command-line tool for mounting registry hives:
C:\>reg load hku\z "C:\Documents and Settings\Userhku\z\ntuser.dat"
The operation completed successfully.
C:\>regedit
::You can navigate to HKEY_USERS\z in REGEDIT to view the mounted hive
C:\>reg unload hku\z
The operation completed successfully.
Related videos on Youtube
Author by
Eli Rose
Updated on September 18, 2022Comments
-
Eli Rose over 1 year
I've got this:
def gradient_descent( ... model_class: Type[Model], J: Callable[[np.ndarray, model_class], float], ... ):
I want this function to take in a class, and also a function that accepts an instance of that class. However, this gives me the error
Name "model_class" is not defined.
. I'm assuming that's because mypy doesn't have access tomodel_class
at typechecking time.Is there any way to achieve this?
-
Synetech almost 11 years
This file really exists and has 0 size.
There’s your answer; the registry hive is corrupt. If it is 0 bytes, then it is completely empty and cannot be mounted. Are you sure you are using the correct hive file? If you try to mount a non-existent hive, then one will be created, so you may have done that by accident. Try searching the drive forntuser.dat
, then look at the Folder and Size columns to see if you can find the right one. If you find nothing at all, then it may have been completely deleted. In that case, see if there is a copy (e.g.,ntuser.bak
). -
Aaron Miller almost 11 years"If you try to mount a non-existent hive, then one will be created[.]" Oh, Windows, don't you ever change.
-
user4035 almost 11 years@Synetech Look carefully: ntuser.dat.log is empty. While ntuser.dat is not empty and was correctly loaded, using Live CD. Also when I cured the virus, I was able to successfully login as this user, and all the previous settings were intact. So, I think that HKEY_CURRENT_USER hive for this user is not corrupted. And that's the point.
-
Ramhound almost 11 years@user4035 - You will need to delete the profile and create a new one if the profile is corrupt.
-
Synetech almost 11 yearsAh, I just noticed the
.log
extension. See my answer below. -
Eli Rose over 4 years@jonrsharpe I don't think so because that answer seems to have nothing to do with mypy.
-
jonrsharpe over 4 yearsThat doesn't really matter; you're not getting as far as MyPy, this is a Python problem.
-
Eli Rose over 4 years@jonrsharpe I know my attempted (wrong) solution results in a Python error, but I still see the problem as a mypy problem. Perhaps I'm missing something, though -- how would I use the techniques described in that answer to solve my problem?
-
jonrsharpe over 4 yearsAh, it's not quite that, sorry. It's still not a MyPy problem, though, you simply cannot reference other params like that in Python.
-
juanpa.arrivillaga over 4 yearsmodel_class should just be
J: Callable[[np.ndarray, Model], float]
no? -
juanpa.arrivillaga over 4 yearsAs an aside, ditch those commas. They are incorrect
-
Eli Rose over 4 years@juanpa.arrivillaga That type would work, but I want to type it more specifically than that.
-
-
Eli Rose over 4 yearsHmm, when I run this I get "'TypeVar' can only have a single constraint." The example gives two constraints,
TypeVar('T', str, bytes)
. It looks like it's functioning as a union type of the two? As opposed to declaring that type T is a subclass of Model. -
jonrsharpe over 4 years@EliRose--REINSTATEMONICA ah yes; fixed, see e.g. stackoverflow.com/a/50185096/3001761