Skip to content

Export Registry Key

Exports a registry key, including all of its subkeys and values, to a .reg file. This is useful for taking a backup of a configuration before changing it, for collecting a configuration from a reference machine, or for producing a file that the [Import Registry File] PowerBrick can apply on other machines.

Required — Default: HKEY_LOCAL_MACHINE

Select the registry hive that contains the key to export.\n\nHKEY_CURRENT_USER is deliberately not offered here. In the other registry PowerBricks it means every user profile on the endpoint, because a PowerBrick runs as the local system account and never as the signed-in user. An export writes one single file, so it cannot cover every profile, and offering the same choice for a different meaning would be misleading.\n\nTo export the settings of one specific user, select HKEY_USERS and start the Registry Key with that user’s SID, for example S-1-5-21-1004336348-1177238915-682003330-1001\Software\MyCompany\MyApp. Allowed values: HKEY_LOCAL_MACHINE, HKEY_CLASSES_ROOT, HKEY_USERS.

Required — Default: SOFTWARE\Sample

The path of the registry key within the selected registry hive. Everything below the key is included in the export.\n\nExample:\nSOFTWARE\MyCompany\MyApp\n\nDo not repeat the hive name here, it is already chosen above. If the path you paste in begins with the hive you selected, that part is removed for you. If it begins with a different hive, the PowerBrick stops with an error instead of exporting the wrong key.\n\nTo export the 32-bit view of a key on a 64-bit endpoint, write the path with Wow6432Node in it, for example SOFTWARE\Wow6432Node\MyCompany\MyApp.\n\nOnly keys under HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER can be applied again with the [Import Registry File] PowerBrick.

Required — Default: C:\Temp\Export.reg

The full path of the .reg file to create. The folder is created automatically if it does not exist.\n\nExample:\nC:\Temp\MyApp.reg

Optional — Default: True

Enable to replace the destination file when it already exists. Disable to stop with an error instead, so an existing export is never lost.

Optional — Default: False

Enable to add the current date and time to the file name, so every run creates its own file instead of replacing the previous one. Useful when the export is a repeated backup.\n\nExample:\nC:\Temp\MyApp.reg becomes C:\Temp\MyApp_20260901_143012.reg

Optional — Default: False

Enable to continue without an error when the registry key does not exist. Nothing is exported and a note is written to the log. Disable to stop with an error when the key is missing.

  • Category: Registry
  • Brick ID: Registry-Export