?
Solved

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

Posted on 1997-10-13
6
Medium Priority
?
788 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 

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 200 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
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…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

770 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