Results 1 to 6 of 6
  1. #1
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    RegSaveKey API (6)

    Anybody use the RegSaveKey API?

    I get a very strange file using the example that can be found in the RegSaveKey example in the API Guide.
    And I found another posting stating the same problem.
    And, I found another code having the same problem.

    I find it hard to believe that RegSaveKey doesn't work.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: RegSaveKey API (6)

    When you export a registry key from RegEdit, the result is a plain text file that you can easily edit (if you know what you're doing).
    The RegSaveKey API function saves a key in the same binary format used by the registry itself.

  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RegSaveKey API (6)

    OK, it;s not what need, but I also cannot get RegRestoreKey to restore from the file produced by RegSaveKey.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: RegSaveKey API (6)

    My guess is that you'd need to write a lot of additional code to make it useful.
    RegRestoreKey only works for me if the key already exists. The higher-level registry functions include code to create a key on the fly if it doesn't exist yet; this is clearly lacking here.

  5. #5
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RegSaveKey API (6)

    Ayup, I figgered that out last night.
    It's an easy fix.

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RegSaveKey API (6)

    Thanx.

    I was Shell-ing to regedit to get a text .reg file.
    And I'l likely write a program to convert between the two formats.

Posting Permissions

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