Is it possible to access the registry hive inside of NTUser.dat file?
The reason I am asking is that I frequently install ODBC DSN on computers, and I know that the User DSNs are stored in the registry. If I want to install these DSN drivers quickly, should I somehow edit the NTUser.dat? Export an existing set of registry keys? Maybe use a powershell script to add them to NTUser.dat?
Best Answer
If NT registry hive is not mounted, you can mount (load) it yourself.
Registry hives are also loadable and editable from the command line:
So you may call it from your Powershell or batch script.
But all local user hives are usually automounted in HKEY_USERS. So you need to manually mount only foreign registry hives.
P.S. I prefer the term "mounting" instead of "loading" because loaded registry file not just loaded to RAM, it's locked and being actively changed on disk, so it can't be copied away until dismounted/unloaded.