Results 1 to 5 of 5

Thread: Batch Registry export

  1. #1
    jgt1942 is offline New Member
    Join Date
    Jan 2010
    Posts
    7

    Default Batch Registry export

    Can you please tell me why the following does not work in my batch file to extract a key from the registry?

    REG SAVE HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook I:\BU\Outlook\Registry\W700-Outlook.reg



    I get an error that the syntax is invalid. I've confirmed that I have the correct path for my key. I want to extract my Outlook 2007 registry key that contains my user accounts, passwords, rules, etc. I've got the data files, the keys are the only thing I cannot get at this time (I can do a manual export in regedit). I'm trying to set up a batch file that I can schedule a run on a weekly basis to help ensure I have a recovery path when something goes wrong.

    Win7 Ultimate x64, office 2007

  2. #2
    rkonit's Avatar
    rkonit is offline Gold Member
    Join Date
    Jul 2008
    Location
    Pilani, India
    Posts
    1,363

    Default

    Check the path of Registry Key!
    FYI Using Reg Command line utility, you can't take backup of registry in human readable code (.REG). It would be saved in encrypted form (.HIV)

    Do one more thing. Run CMD as Administrator or Batch File.

  3. #3
    jgt1942 is offline New Member
    Join Date
    Jan 2010
    Posts
    7

    Default

    Per the info at technet.microsoft.com/en-us/library/cc742017%28WS.10%29.aspx# as I understand it, you can create a batch file to export a key. Based on this article I changed my BATCH line to
    REG EXPORT HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook I:\BU\Outlook\Registry\W700-Outlook.reg /y

    But it still fails.

    The path of the registry key is correct.

    I've run CMD as admin and as stated in the original post I've also created a BATCH file.

  4. #4
    rkonit's Avatar
    rkonit is offline Gold Member
    Join Date
    Jul 2008
    Location
    Pilani, India
    Posts
    1,363

    Default

    Yeah!!! In the first post you were passing SAVE argument to reg.exe, that save hive rather than human readable Reg code.

    You can use EXPORT to get human readable code in .Reg format

    REG EXPORT "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook" I:\BU\Outlook\Registry\W700-Outlook.reg /y
    I just marked the Quote to the path of key and it works fine.

  5. #5
    jgt1942 is offline New Member
    Join Date
    Jan 2010
    Posts
    7

    Default

    Big Thanks! Something so simple really threw me a curve. I reread the technet post and would still have missed adding the quotes.

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22