CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2005
    Posts
    55

    Export registry key

    Is there API function that exports registry key?

  2. #2
    Join Date
    May 2005
    Posts
    4,954

    Re: Export registry key

    One way to do it is simply use ::CreateProcess(..) with regedit.exe command lines for export, here is a sample:

    Code:
      char szRegCommand[MAX_PATH];
      ::sprintf(szRegCommand,"regedit.exe /e:a \"c:\\Exported.reg\" \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\"");
      STARTUPINFO SI={0};
      PROCESS_INFORMATION PI={0};
      ::CreateProcess(0,szRegCommand,0,NULL,false,CREATE_DEFAULT_ERROR_MODE,NULL,0,&SI,&PI);
    Cheers
    If a post helped you dont forget to "Rate This Post"

    My Article: Capturing Windows Regardless of Their Z-Order

    Cheers

  3. #3
    Join Date
    Apr 1999
    Posts
    3,585

    Re: Export registry key

    Have you tried using RegSaveKeyEx?
    Gort...Klaatu, Barada Nikto!

  4. #4
    Join Date
    May 2005
    Posts
    4,954

    Re: Export registry key

    Quote Originally Posted by Mike Harnad
    Have you tried using RegSaveKeyEx?
    Looks promising somehow it missed that api

    Cheers
    If a post helped you dont forget to "Rate This Post"

    My Article: Capturing Windows Regardless of Their Z-Order

    Cheers

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

Featured