Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: copy registry key to disk  (Read 17265 times)

0 Members and 1 Guest are viewing this topic.

mrbishman

    Topic Starter


    Greenhorn

    copy registry key to disk
    « on: September 12, 2010, 05:36:47 AM »
    Hi guys

    Is there a way of copying a specific registry key to a drive on a computer (e.g. a usb drive) so that it can later be restored onto a new PC?
    What i'm looking to do is create an application for a piece of software that takes a backup of all the relevant files and folders attached to the software, and relevant registry keys - so that it can be copied onto a new PC, with all the registry keys that have been backed up can replace the current ones.

    Cheers

    jason2074



      Egghead

    • It doesn't matter.
    • Thanked: 224
    • Experience: Beginner
    • OS: Windows 7
    Re: copy registry key to disk
    « Reply #1 on: September 12, 2010, 06:52:03 AM »
    ERUNT : http://pcug.org.au/boesen/ERUNT/ERUNT.htm

    But I don't know about your other specifics...

    Allan

    • Moderator

    • Mastermind
    • Thanked: 1260
    • Experience: Guru
    • OS: Windows 10
    Re: copy registry key to disk
    « Reply #2 on: September 12, 2010, 06:59:14 AM »
    You cannot take a registry from one system and use it on another and expect it to work.

    patio

    • Moderator


    • Genius
    • Maud' Dib
    • Thanked: 1769
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    Re: copy registry key to disk
    « Reply #3 on: September 12, 2010, 08:31:25 AM »
    Can anyone guess what he's attempting to do ? ? ?
    " Anyone who goes to a psychiatrist should have his head examined. "

    Allan

    • Moderator

    • Mastermind
    • Thanked: 1260
    • Experience: Guru
    • OS: Windows 10
    Re: copy registry key to disk
    « Reply #4 on: September 12, 2010, 08:47:18 AM »
    Can anyone guess what he's attempting to do ? ? ?
    :)

    jason2074



      Egghead

    • It doesn't matter.
    • Thanked: 224
    • Experience: Beginner
    • OS: Windows 7
    Re: copy registry key to disk
    « Reply #5 on: September 12, 2010, 09:15:06 AM »
    Quote
    But I don't know about your other specifics...

    I kinda expected this though :-X
     
     
     

    michaewlewis



      Intermediate
    • Thanked: 26
      • Yes
      • Yes
    • Experience: Expert
    • OS: Unknown
    Re: copy registry key to disk
    « Reply #6 on: September 13, 2010, 08:58:19 AM »
    Come on guys, his request might be legit. I've had to copy registry keys from pc to pc a few times on my network. He could be working with some custom software that requires it.

    Hi guys

    Is there a way of copying a specific registry key to a drive on a computer (e.g. a usb drive) so that it can later be restored onto a new PC?
    What i'm looking to do is create an application for a piece of software that takes a backup of all the relevant files and folders attached to the software, and relevant registry keys - so that it can be copied onto a new PC, with all the registry keys that have been backed up can replace the current ones.

    Cheers

    Sounds like you're wanting to make an application portable. Check out this link: http://portableapps.com/node/16261

    Also: http://www.vmware.com/products/thinapp/

    mrbishman

      Topic Starter


      Greenhorn

      Re: copy registry key to disk
      « Reply #7 on: September 15, 2010, 02:09:31 PM »
      don't worry... it's all very legit! lol

      Basically I work with a piece of printing accounting software in my workplace. when the software is installed, it addsa few files to the C: drive, as well as adding a connection string registry key to the system within hkey_local_machine -which provides the credentials for connecting to an sql database (also set up during the installation software).
      I get a lot of call from customers who decide they want to backup the system and its data and migrate it over to a new server - and i want to create an application that does this, and which would involve the following steps:

      *Stop IIS and Print Spooler services
      * Copy 2 folders from C:\Program Files
      *Copy a specific registry key from tree within hkey_local Machine.

      Once the software has been initially set up on the other server (takes 4 minutes with an .exe), I want the application to replace the files on the C: drive with the backed up files - likewise with the single registry key.

      Comprende? lol



      Azzaboi



        Apprentice
      • Aaron's Game Zone
      • Thanked: 37
        • Aaron's Game Zone
      • Experience: Experienced
      • OS: Windows 7
      Re: copy registry key to disk
      « Reply #8 on: September 15, 2010, 02:31:25 PM »
      It's easy to copy registry...
      The only issue, as meationed, is the key/values might not work on another computer depending on settings and locations. It's a bit odd to do this unless it's backup, tweaking, etc.

      Go to the registry editor:
      1) Start > Run > type 'regedit' (without the quotes) and enter.
      2) Location the key or folder of registry keys/values and select.
      3) Go File > Export
      4) Save file as something.reg and copy that onto the flash drive or where ever for backup.
      4) Simply double click the file to import the keys or your application could also call this file.
      Aaron's Game Zone
      The best free online flash games: http://azzaboi.weebly.com

      Play Games - Play free games at Play Games Arcade

      mrbishman

        Topic Starter


        Greenhorn

        Re: copy registry key to disk
        « Reply #9 on: September 16, 2010, 01:24:47 AM »
        Hi

        What I'm thinking about is creating the interface in visual basic, and then using scripts to carry out all the procedures, rather than having to do each part manually.
        Is it possible to copy the registry keys using script? If so, do you know what kind it would be? ie.e VBscript, Windows scripting, etc.

        michaewlewis



          Intermediate
        • Thanked: 26
          • Yes
          • Yes
        • Experience: Expert
        • OS: Unknown
        Re: copy registry key to disk
        « Reply #10 on: September 16, 2010, 09:50:01 AM »
        Hi

        What I'm thinking about is creating the interface in visual basic, and then using scripts to carry out all the procedures, rather than having to do each part manually.
        Is it possible to copy the registry keys using script? If so, do you know what kind it would be? ie.e VBscript, Windows scripting, etc.

        hmm... I would suggest reposting your question in the computer programming section of the forum. I don't know how many programmers regularly check this section and you would probably get a better answer from them.

        Azzaboi



          Apprentice
        • Aaron's Game Zone
        • Thanked: 37
          • Aaron's Game Zone
        • Experience: Experienced
        • OS: Windows 7
        Re: copy registry key to disk
        « Reply #11 on: September 16, 2010, 12:10:12 PM »
        Well I'm not the best with VBScript, etc, but if I remember correctly...

        HKEY_CURRENT_USER or HKCU
        HKEY_LOCAL_MACHINE or HKLM
        HKEY_CLASSES_ROOT or HKCR
        HKEY_USERS
        HKEY_CURRENT_CONFIG

        Quote
        Dim objShell, Value
        Value = 0

        ' First create the object shell to work with
        Set objShell= WScript.CreateObject("WScript.Shell")

        ' Write a registry value (as a DWORD or whatever value it should be)
        objShell.RegWrite "HKLM\Software\AppName\Valuename", Value, "REG_DWORD"

        ' Read a registry value
        Value = objShell.RegRead ("HKLM\Software\AppName\Value")

        ' Remove a registry value
        objShell.RegDelete "HKLM\Software\AppName\Valuename"

        ' Remove the entire registry key
        objShell.RegDelete "HKLM\Software\AppName\"

        WScript.Quit ' Tells the script to stop and exit.

        Hope that will help or at least give you an idea.
        Aaron's Game Zone
        The best free online flash games: http://azzaboi.weebly.com

        Play Games - Play free games at Play Games Arcade