Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Aug 2004
    Location
    Burlington, Vermont, USA
    Posts
    35
    Thanks
    0
    Thanked 1 Time in 1 Post

    Save settings from registry with a batch file (XP Pro)

    We know how to save regular files from the OS with with a batch file, but how do you save settings from the registry like

    HKEY_CURRENT_USERIdentities{identity #}SoftwareMicrosoftOutlook Express5.0

    using a batch file so this process can be automated on a regular basis?

  2. #2
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,331
    Thanks
    5
    Thanked 1,014 Times in 889 Posts

    Re: Save settings from registry with a batch file (XP Pro)

    Start a console window. Then enter "REG /?" without the quotation marks for options.

    Joe
    Joe

  3. #3
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Save settings from registry with a batch file

    You can certainly do it using REG EXPORT, but why not try an OE-specific backup program such as Majik's Outlook Express Quick Backup? For me, this backs up about 25 kB-worth of assorted REG keys and values, plus all the OE files/databases...

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  4. #4
    Lounger
    Join Date
    Aug 2004
    Location
    Burlington, Vermont, USA
    Posts
    35
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Save settings from registry with a batch file (XP Pro)

    Okay...I got it figured out.

    For those interested, the line I needed to add to my batch file was:

    regedt32.exe /e "Cocuments and SettingsChuckMy DocumentsOEbackup.reg" "HKEY_CURRENT_USERIdentities{50821E75-E91E-3778-9EE8-7A9F5B90GFD6}SoftwareMicrosoftOutlook Express5.0"

    'regedt32.exe' opens the registry and finds the key, the 'e' switch exports it to a location I designate, in the is case 'My Documents', with a name I created, 'OEbackup.reg'.

    What I did wrong was not was not know it was exporting to a default location (C:WindowsSystem32) unless I designated like I did and thus was not copying it. The other thing was that I was trying to export it last instead of first, so the exported key was never being copied. I told it to be exported first, copied to 'My Documents', then to the ZIP - works great!

    The final result is this:

    <code>@echo off

    rem This deletes the previous backup archive

    del C:backup.zip

    rem This exports registry key mail settings, rules,
    rem sigs to 'My Documents' to be copied

    regedt32.exe /e "Cocuments and SettingsChuckMy DocumentsOEbackup.reg" "HKEY_CURRENT_USERIdentities{50821E75-E91E-3778-9EE8-7A9F5B90GFD6}SoftwareMicrosoftOutlook Express5.0"

    rem This copies the files in the paths to a zip folder on the root drive

    c:zip -9r C:backup.zip "Cocuments and SettingsChuckApplication DataAvant Browser" "Cocuments and SettingsAll UsersApplication DataSpybot - Search & Destroy" "Cocuments and SettingsAll UsersApplication DataSymantec" "Cocuments and SettingsChuckApplication DataSymantecShared" "Cocuments and SettingsChuckApplication DataMicrosoftAddress Book" "Cocuments and SettingsChuckLocal SettingsApplication DataIdentities{50821E75-E91E-3778-9EE8-7A9F5B90GFD6}MicrosoftOutlook Express" "Cocuments and SettingsChuckFavorites" "Cocuments and SettingsChuckDesktop" "Cocuments and SettingsChuckMy Documents" "C:WINDOWSsystem32driversetc"

    rem end</code>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •