Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Registry Question

Registry Question

Scheduled Pinned Locked Moved C / C++ / MFC
questionwindows-admin
4 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    ldaoust
    wrote on last edited by
    #1

    I need to save a key and all it's subkeys. The key is: HKEY_CURRENT_USER/Software/{company name}/{app name} I then need to restore all those keys to a new {app name} How do I do that ? I know the functions: RegSaveKey and RegRestoreKey, but I need to do that under win95/98 also and RegRestoreKey is not available under these OS. thanks, Louis.

    P B 2 Replies Last reply
    0
    • L ldaoust

      I need to save a key and all it's subkeys. The key is: HKEY_CURRENT_USER/Software/{company name}/{app name} I then need to restore all those keys to a new {app name} How do I do that ? I know the functions: RegSaveKey and RegRestoreKey, but I need to do that under win95/98 also and RegRestoreKey is not available under these OS. thanks, Louis.

      P Offline
      P Offline
      pba_
      wrote on last edited by
      #2

      Try with RegSaveKey - RegReplaceKey pair

      L 1 Reply Last reply
      0
      • P pba_

        Try with RegSaveKey - RegReplaceKey pair

        L Offline
        L Offline
        ldaoust
        wrote on last edited by
        #3

        Yes I'm ready to 'try' but the doc says that the change will be effective only after reboot!! Not very elegant to ask your users to reboot their machine after starting up the program. Have you tried this function ? Is that really the case ? thanks, Louis.

        1 Reply Last reply
        0
        • L ldaoust

          I need to save a key and all it's subkeys. The key is: HKEY_CURRENT_USER/Software/{company name}/{app name} I then need to restore all those keys to a new {app name} How do I do that ? I know the functions: RegSaveKey and RegRestoreKey, but I need to do that under win95/98 also and RegRestoreKey is not available under these OS. thanks, Louis.

          B Offline
          B Offline
          Blake Miller
          wrote on last edited by
          #4

          Enumerate all the keys and values in the tree. Then write out a file in the REG format that RegEdit or RegEdt32 uses. You can then run the RegEdit passing it command line arguments to reload the REG file. The REG files are text files. No reboot would be required.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups