Results 1 to 4 of 4

Thread: [RESOLVED] Backup/Export Registry Key

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Posts
    159

    Resolved [RESOLVED] Backup/Export Registry Key

    Hello all,

    I am trying to find a way to backup/export a Registry Key branch (including subkeys) in my program. I have searched google and have not found anything that seems to make much sense to me.

    Can anyone provide me direction on how I can do this?

    Thanks!

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Backup/Export Registry Key

    You can look at using regedit /e (e switch) or you can go for an 'existing' sample.

    http://www.codeproject.com/KB/XML/registryxml.aspx

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Posts
    159

    Re: Backup/Export Registry Key

    I was actually able to get this to work with the method that you provided.

    Code:
    string Command = ("/C regedit.exe /e " + @"""" + ModernTechBU + @"\CurrentUser.Reg" + @"""" + CurrentUser);
                           
                if (Directory.Exists(ModernTechBU)==false)
                {
                    Directory.CreateDirectory(ModernTechBU);
                }
    
                System.Diagnostics.Process.Start("CMD.exe", Command);
                RegCall.Close();
    Thanks!

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [RESOLVED] Backup/Export Registry Key

    Good to know.

Posting Permissions

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



Click Here to Expand Forum to Full Width