can you load a hive with a script or cmd line

G

Guest

i have a script ready to modify the default user ntuser.dat file but i have
to load the hive prior to running it any way to add the load and unload to
the script??
 
D

David Candy

This is a stupid question. Without knowing your script how can we know what is appropiate. Type reg in help.
 
T

Torgeir Bakken \(MVP\)

Mike said:
i have a script ready to modify the default user ntuser.dat
file but i have to load the hive prior to running it any way
to add the load and unload to the script??
Hi,

You can use the command line utility reg.exe for this (it comes
builtin with WinXP).

You would need to start out with loading the default user's HKCU hive
to a *temporary* key under HKLM, like this:

reg.exe load HKLM\TempHive "C:\Documents and Settings\Default User\NTUSER.DAT"

Then you can use reg.exe to query and/or manipulate the hive,
addressing the HKEY_LOCAL_MACHINE\TempHive key that actually
represent the HKEY_CURRENT_USER key for the default user.

When finished, unload the hive again like this:

reg.exe unload HKLM\TempHive

Run "reg.exe /?" in a command prompt for more help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top