Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5993129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:37:51+00:00 2026-05-22T23:37:51+00:00

I need to import a .reg file that contains standard configuration settings for a

  • 0

I need to import a .reg file that contains standard configuration settings for a server product. However, it’s possible that a single Windows box might contain multiple server instances. Each server instance has its own configuration keys in the Windows registry.

The first instance will have the default registry key:

HKLM\SOFTWARE\<Vendor>\<Product>\Settings

Any other instances will have variant names, eg:

HKLM\SOFTWARE\<Vendor>\<Product>\Settings-foo
HKLM\SOFTWARE\<Vendor>\<Product>\Settings-bar
HKLM\SOFTWARE\<Vendor>\<Product>\Settings-baz

etc…

The registry file contains settings that need to be applied to each of these server instances. The structure of the registry sub-keys is the same within each key. So, the manual deployment process is to take the .reg file and do a file search-and-replace for "SOFTWARE\<Vendor>\<Product>\Settings\" and replace it with "SOFTWARE\<Vendor>\<Product>\Settings-foo\", then import the newly tweaked .reg file. Rinse & repeat for bar, baz etc.

What I want to do is write a PowerShell script that gets a list of all the “Settings-” keys and does the equivalent search-and-replace before importing the .reg file. I haven’t found a cmdlet that can import .reg files, so I guess I have to call reg.exe or regedit.exe. Both of those programs allow you to import the contents of a .reg file that’s on disk.

My question is, do I actually have to create .reg files and write them to disk so that I can then call reg.exe /Import <filename> or regedit.exe /S <filename>? Or is there some way I can just load the original .reg file, modify it in memory, and get reg.exe or regedit.exe to import the modified registry keys without needing to write a whole stack of .reg files to disk?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:37:52+00:00Added an answer on May 22, 2026 at 11:37 pm

    As far as I know, basic PowerShell Cmdlets don’t use .reg file at all.

    So, on one hand you can modify your reg files and apply them with REG.EXE. On the other hand you can use PowerShell registry provider an ‘Item’ CMdlets to modify your registry.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to import the .sql file of PHP myadmin into SQL Server 2008.
I need to import data from a file into a Microsoft SQL Server database.
I need to import a large CSV file into an SQL server. I'm using
i need to import a mysql file into my access db. how do i
I need to import data from *.dmp file say mydump.dmp. What I'm doing is:
I need to import a database into a SQL Server instance using a batch
In our project we need to import the csv file to postgres. There are
I need to import and show a 3D model from a WRL file in
I need to import records stored in a MySQL Database that I do not
I need to import an database(sql file) which is about 120M is size, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.