backing up part of the registry - WinXP

T

Teranews

was looking for software to backup part of the registry and found it in a
batch file

regedit /ea alarms.reg HKEY_CURRENT_USER\Software\BonSoft\ClocX\Alarms

still trying to figure out what it means especially the /ea
 
O

omega

Teranews said:
was looking for software to backup part of the registry

( Sidenote. For those who need a GUI deal:
http://camtech2000.net/Pages/RegKey_Backup.html )
and found it in a batch file

regedit /ea alarms.reg HKEY_CURRENT_USER\Software\BonSoft\ClocX\Alarms

still trying to figure out what it means especially the /ea

The switch is /e for export.

That trailing a, coincidentally I've seen it before. Yet I insist it is
a typo. Test any trailing letter after the /e and regedit just ignores,
acts like all that's there is the /e.

There are two standard switches for regedit you'd use in batch files
under Windows. The /e to export a key. And the /s to merge a .reg file
without a prompt.

_________________________________________________________________________
Import

regedit "addto-bonsoft.reg"

Import, Silent, /S

regedit /s "addto-bonsoft.reg"

Export, /E

regedit /e "export-bonsoft.reg" "HKEY_CURRENT_USER\Software\BonSoft"
__________________________________________________________________________


Keep in Mind. Standard principles with batch files...

1. Take the habit of quotes. Often the regkey paths will contain spaces,
so it will be essential to surround them in quotes. Example:

: regedit /e "save-colors.reg" "HKEY_CURRENT_USER\Control Panel\Colors"

2. Pay attention to relative paths. If you launch your batch from a toolbar
or some other weird place, then your saved export file is going to land
wherever the OS thinks its current path is. So if appropriate, consider
using a full path with the file save name.

: regedit /e "d:\backups\reg\export-bonsoft.reg" "HKEY_CURRENT_USER\Software\BonSoft"
 
O

omega

regedit /ea alarms.reg HKEY_CURRENT_USER\Software\BonSoft\ClocX\Alarms
The switch is /e for export.
That trailing a, coincidentally I've seen it before. Yet I insist it is
a typo.

Well, I did a search. Learnt that it won't do me much good to insist about
the trailing a.

http://www.winnetmag.com/Article/ArticleID/14754/14754.html

| What's new in the Windows 2000 version of RegEdit?
|
| Another change is the addition of the ability of new RegEdit to
| save files in the old (REGEDIT4) format from the command line,
| using a command-line switch -ea.


Choice between /e and /ea for your export switch.

The -ea, it'd ensure your exported .reg files are easily readable, and
compatible, where appropriate, on 9X systems.
 

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