www.technipages.com Open in urlscan Pro
2606:4700:20::681a:14a  Public Scan

Submitted URL: http://www.technipages.com/windows-10-import-export-registry-keys-from-command-line/
Effective URL: https://www.technipages.com/windows-10-import-export-registry-keys-from-command-line/
Submission: On October 21 via manual from IN — Scanned from CA

Form analysis 2 forms found in the DOM

GET https://www.technipages.com/

<form class="mega-search expand-to-left mega-search-closed" role="search" action="https://www.technipages.com/" method="get">
  <span class="dashicons dashicons-search search-icon"></span>
  <input type="submit" value="Search">
  <input type="text" aria-label="Search the site" data-placeholder="Search the site" name="s" placeholder="">
</form>

POST https://www.technipages.com/wp-comments-post.php

<form action="https://www.technipages.com/wp-comments-post.php" method="post" id="commentform" class="comment-form" novalidate="">
  <p class="comment-notes"><span id="email-notes">Your email address will not be published.</span> <span class="required-field-message">Required fields are marked <span class="required">*</span></span></p>
  <p class="comment-form-comment"><label for="comment">Comment <span class="required">*</span></label> <textarea id="comment" name="comment" cols="45" rows="8" maxlength="65525" required=""></textarea></p>
  <p class="comment-form-author"><label for="author">Name <span class="required">*</span></label> <input id="author" name="author" type="text" value="" size="30" maxlength="245" autocomplete="name" required=""></p>
  <p class="comment-form-email"><label for="email">Email <span class="required">*</span></label> <input id="email" name="email" type="email" value="" size="30" maxlength="100" aria-describedby="email-notes" autocomplete="email" required=""></p>
  <p class="comment-form-url"><label for="url">Website</label> <input id="url" name="url" type="url" value="" size="30" maxlength="200" autocomplete="url"></p>
  <p class="comment-form-subscriptions"><label for="subscribe-reloaded"><input style="width:30px" type="checkbox" name="subscribe-reloaded" id="subscribe-reloaded" value="yes"> Notify me of followup comments via e-mail. You can also
      <a href="https://www.technipages.com/comment-subscriptions/?srp=49218&amp;srk=3f5b3f2b5879010cd602e3553f8c78be&amp;sra=s&amp;srsrc=f">subscribe</a> without commenting.</label></p>
  <p class="form-submit"><input name="submit" type="submit" id="submit" class="submit" value="Post Comment"> <input type="hidden" name="comment_post_ID" value="49218" id="comment_post_ID">
    <input type="hidden" name="comment_parent" id="comment_parent" value="0">
  </p>
  <p style="display: none;"><input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="e302876943"></p>
  <p style="display: none !important;" class="akismet-fields-container" data-prefix="ak_"><label>Δ<textarea name="ak_hp_textarea" cols="45" rows="8" maxlength="100"></textarea></label><input type="hidden" id="ak_js_1" name="ak_js"
      value="1729498552407">
    <script>
      document.getElementById("ak_js_1").setAttribute("value", (new Date()).getTime());
    </script>
  </p>
</form>

Text Content

Skip to content
 * Topics
   * * * Android
       * Browsers
       * Gaming
       * Hardware
       * Internet
       * iPhone
       * Linux
     * * macOS
       * Office
       * Reviews
       * Software
       * Windows
       * Definitions
       * All Recent Posts
   * * 
 * Product Reviews
 * About
 * 


WINDOWS 10 IMPORT/EXPORT REGISTRY KEYS FROM COMMAND LINE

Mel HawthorneApril 6, 2020 Comments (0)


Copying registry keys from one device to another is an effective way to quickly
configure Windows settings to a new computer in your home or office. Manually
copying registry keys would take forever and run a high risk of errors – this is
a better way. Exporting and importing the registry keys though Command Prompt
provides an efficient path to ensure your registry entries are copied across
correctly. So how do you import and export registry keys via command line?



For those unfamiliar with it, the Windows registry is a database, which stores a
large number of configuration options for Windows, and for other software
installed on the computer. Settings are saved in the registry as registry keys,
these are both the name of the setting, and the value of the setting, where
applicable.

The registry is split into five trees that carry settings for different use
cases, each of these is its own RootKey. One RootKey is “HKCU” or
“HKEY_Current_User”. The HKCU RootKey is used for settings that apply
specifically to the currently logged in user. Each RootKey has a number of
Subkeys, which in turn contain further SubKeys.

The full name of any registry key is the name of the RootKey, followed by the
names of each SubKey needed to get to the specific key intended, connected by a
backward slash. For example, the registry key “Settings”, is a SubKey of
“Printers”, which itself is a SubKey of the RootKey; HKCU. The full name for
this registry key is “HKCU\Printers\Settings”.



The first step is to open Command Prompt. To do so, open the Start Menu by
pressing the Windows key, then type “Command Prompt”. Don’t just launch it
though, you’ll need to start it with administrative privileges. To do so, either
click “Run as administrator” on the right-hand side of the Start Menu, or by
right-clicking on the app and selecting “Run as administrator” from the dropdown
list.



Start Command Prompt as an administrator.



Tip: If Command Prompt is not present on your device, Windows PowerShell will
work identically.

Once Command Prompt is open, type the command “Reg export /?”, to see the help
page for the registry export command. This page explains what each of the
arguments do, what order they need to be in, and which ones are optional.



The help page for the “Reg Export” command.




The Keyname argument is the name of the registry key that is to be exported, it
is split into two sections, the RootKey and SubKey. The Rootkey is one of the
five registry trees. You can either write them out in full i.e.
“HKEY_Current_User” or in their shortened form i.e. “HKCU”.

The SubKey is the path to the SubKey you want to be exported. The path can be to
a single specific SubKey, all the way to the maximum 512 levels deep, or it can
be to a high-level SubKey with further SubKeys. It is also possible to leave the
SubKey blank, this will export the entire RootKey tree, including all of its
SubKeys. If you don’t know which specific one you want, choosing a higher level
one that includes what you are looking for is your best bet – just don’t go too
high, or you may end up with things you don’t want.

The FileName is the name of the file you want to export the registry keys to. If
you just provide a filename with no path information, then the file will be
saved in the current directory that Command Prompt is in. If you’ve launched
Command Prompt with administrative permissions, then it will have opened in the
“C:\Windows\system32” directory. System32 is NOT a good place to save an
exported registry key file as it contains sensitive Windows components, you
should instead consider using a user directory such as your desktop. Starting
your file path with “%UserProfile%” moves the output directory to your user
directory, e.g. “%UserProfile%\Desktop” will save a file to your desktop
directory.

Tip: The file name should always end with the .reg file extension. This is the
recognised registry settings filetype.

The other command arguments are less important and entirely optional. For
example, /y automatically overwrites files with the same name, if they exist.
The /reg:32 and /reg:64 arguments allow you to specify if the key is accessed
with the 32- or 64-bit registry view respectively.

Now you’re ready to write and run the actual command. The command should be “reg
export ‘RootKey[\SubKey]’ ‘FileName’”. No quotes are necessary – just type in
the Keynames you need. The RootKey and the FileName are mandatory items, whereas
the SubKey section can be left blank to export the entire RootKey.



“The operation completed successfully.”



If the command completed properly, a message will be printed to the Command
Prompt window saying, “The operation was completed successfully.” The command
may take some time to run, so you may need to wait for the confirmation to
appear.

Now, you should have a reg file saved in the location you specified. You can
copy this to another computer to import it there. Once on your target computer,
you can view the command arguments by typing the command “Reg Import /?”. The
arguments for the import command are very similar to those for the export
command.




The help page for the “Reg Import” command.



Tip: Before modifying the registry, you should create a proper system restore
point. A restore point will provide a “known good” registry configuration that
you can revert to if there are any issues after the import.

To import the reg file run the command “reg import ‘FileName’” where “FileName”
is the file path to the reg file you want to import. Again, once the process
completes successfully, the message “The operation completed successfully” will
be printed.

Categories: Windows


AUTHOR MEL HAWTHORNE






YOU MIGHT ALSO LIKE


 * FIX WINDOWS 10 REGISTRY FILTER DRIVER EXCEPTION
   
   Madalina DinitaWindows


 * WINDOWS 11: HOW TO ENABLE/DISABLE “MANAGE” SELECTION UNDER “THIS PC”
   
   Judy SanhzWindows


 * WINDOWS 11: HOW TO TURN ON AUTO LOGIN
   
   Judy SanhzWindows


 * FIX DYNAMIC LOCK NOT WORKING ON WINDOWS 11
   
   Judy SanhzWindows




LEAVE A REPLY

Your email address will not be published. Required fields are marked *

Comment *

Name *

Email *

Website

Notify me of followup comments via e-mail. You can also subscribe without
commenting.





Δ


0X80040305 ERROR CODE IN MICROSOFT OUTLOOK SOLVED




3 WAYS TO DEACTIVATE MICROSOFT COPILOT




9 FIXES FOR STEAM KEEPS CRASHING ON MY PC




HOW TO SET UP A VERTICAL TASKBAR IN WINDOWS 11




STEAM ERROR 4008 – WHAT IT MEANS AND HOW TO FIX IT





THE EXPERTS BEHIND TECHNIPAGES

My name is Mitch Bartlett. I've been working in technology for over 20 years in
a wide range of tech jobs from Tech Support to Software Testing. I started this
site as a technical guide for myself and it has grown into what I hope is a
useful reference for all.

Learn More



Technipages is part of Guiding Tech Media, a leading digital media publisher
focused on helping people figure out technology. Learn more about our mission
and team here.

© 2024 Guiding Tech Media All Rights Reserved

 * About Us
 * Contact
 * Legal & Privacy

© 2024 Guiding Tech Media All Rights Reserved

Information from your device can be used to personalize your ad experience.
Do not sell my personal information.

Last Updated on April 6, 2020 by Mitch Bartlett



✕
Do not sell or share my personal information.
You have chosen to opt-out of the sale or sharing of your information from this
site and any of its affiliates. To opt back in please click the "Customize my ad
experience" link.

This site collects information through the use of cookies and other tracking
tools. Cookies and these tools do not contain any information that personally
identifies a user, but personal information that would be stored about you may
be linked to the information stored in and obtained from them. This information
would be used and shared for Analytics, Ad Serving, Interest Based Advertising,
among other purposes.

For more information please visit this site's Privacy Policy.
CANCEL
CONTINUE

×
Information from your device can be used to personalize your ad experience.

Do not sell or share my personal information.