Ability to read values from multiple reg keys

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
haltse
Newbie
Posts: 2
Joined: Fri Sep 27, 2002 8:50 pm
Location: Phoenix AZ ( Hell's waiting room)
Contact:

Ability to read values from multiple reg keys

Post by haltse » Wed Oct 29, 2003 7:04 pm

Greetings,

Other than manually requesting a RRK (registry read key)for each subkey is there a more effiecient manner in retrieving all sub keys/values that doesn't involve using VB ( I've nothing against it other than my lack of knowledge using it)

E>g HKEY_CURRENT_USER\Software\testprog\ then Read all entries below this point

Regards

John
Hail Eris, All Hail Discordia

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Oct 29, 2003 9:43 pm

REGEDIT is usually used as a GUI, but it does have a command line capability. So, just need one line in Macro Scheduler
Run Program>REGEDIT /E c:\temp\Testfile.REG "HKEY_CURRENT_USER\Software\MJTNET\
This will write the registry key "HKEY_CURRENT_USER\Software\MJTNET and its subkeys to a file named c:\temp\testfile.REG
==========================================
Here is the syntax information for REGEDIT.EXE

Import (merge) a .REG file:
REGEDIT.EXE [ /L:system ¦ /R:user ] [ /S ] importfile.REG

Export to a (.REG) file:
REGEDIT.EXE [ /L:system ¦ /R:user ] /E exportfile "registry_key"

Compress the registry (Windows 98 only):
REGEDIT.EXE [ /L:system ¦ /R:user ] /C
====================================
Parameters:
importfile.REG .REG file to be imported (or "merged")
exportfile File name the information should be written to
"registry_key" Registry key to be exported
e.g. "HKEY_CLASSES\ROOT\*\shell"
/S Silent, i.e. hide confirmation box when importing files
/E Export registry file
/L:system Specify the location of the system.dat to use
/R:user Specify the location of the user.dat to use
/C Compress [filename] (Windows 98 only)
========================================
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

haltse
Newbie
Posts: 2
Joined: Fri Sep 27, 2002 8:50 pm
Location: Phoenix AZ ( Hell's waiting room)
Contact:

thanks

Post by haltse » Thu Oct 30, 2003 5:21 pm

Bob,

Many thanks for that info, It's going to save me considerable time from trying to chase down and modify scripts that had most of the reg keys hard-coded.

John

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts