Solved

How do I export an ASCII version of a part of the registry

Posted on 1997-10-13
6
766 Views
Last Modified: 2013-12-03
I've seen that by specifying a '/e' on the command line of regedit.exe that it export the entire HKEY_LOCAL_MACHINE to a text file you specify.  Is it possible to export only part of the key to a file?  If so, how?
0
Comment
Question by:postrowski
  • 3
  • 2
6 Comments
 
LVL 3

Expert Comment

by:jaba
ID: 1407381
It possible from regedit.exe , meny Registry/Export Registry File... When, choose "Selected branch" in dialog.
0
 

Author Comment

by:postrowski
ID: 1407382
I should have been more specific.  I'm trying to do this without user interaction, from a C++ program.
0
 
LVL 3

Expert Comment

by:jaba
ID: 1407383
When you have to write small WIN32 program. Enumerate all registry keys in selected branch ( from command line) and write it to file.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:postrowski
ID: 1407384
I know how to do this with a recurvise scan & write, and I've even done this, but it has some limitation.  For example there are a dozen or so different types of registry keys:
   Binary
   ResourceList
   ResourceDecriptor
   ResourceRequirmentsList
   multipleString
   UnexpandedString
   DoubleWord
   String
   DoubleWordBigEndian
   SymbolicLink
   None
   and possibly more to come.

I have only found the format of serveral of these, but not all.
Unless I can be sure that I cover ALL CASES, I would rather use regedit, which is 100% guarentied to work, assuming that I can custom tailor the branch to be exported.
0
 

Accepted Solution

by:
kw040597 earned 50 total points
ID: 1407385
Below is the text copied from WIndows95 Resource Kit:

regedit [/L:system] [/R:user] file1.reg, file1a.reg...
regedit [/L:system] [/R:user] /e file3.reg [regkey]
regedit [/L:system] [/R:user] /c file2.reg

Parameter      Description
/L:system      Specifies the location of SYSTEM.DAT.
/R:user      Specifies the location of USER.DAT.
file1.reg      Specifies one or more .REG files to import into the Registry.
/e file3.reg      Specifies the filename to which the Registry should be exported.
regkey      Optionally, specifies the starting Registry key from which to export a portion of the Registry. If no value is specified, regedit /e exports the entire Registry.
/c file2.reg      Specifies the .REG file to use to replace the entire contents of the Registry.
Caution  Use the regedit /c option with extreme care, and only when you are sure that the specified .REG file contains a complete image of the Registry.

Here's my example:

regedit /e "c:\program files\1.reg" "HKEY_CURRENT_USER\Software\Microsoft\Microsoft Help Workshop"

0
 

Author Comment

by:postrowski
ID: 1407386
Thank you!  I thought I had already tried that combination, but I guess not...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now