Deploy .reg script to the domain

What's the best way to deploy a reg file to the domain?  Can I just stick it into the \\domainname\sysvol ?  Would that work?
LVL 17
Who is Participating?
Nope, renaming from .reg to .bat/.cmd won't work. You will need to keep that .reg file and use the command regedt32.exe /s "filename.reg" in order to merge the registry file into reg. Therefore you will have 2 files, one is the batch and the other is the .reg.

Sample Batch without checking if key exists
@echo off
regedt32.exe /s "\\MyFileServer1\Registry\Registry.reg"
I don't think placing it there will work out of the box, moreover it will probably be applied continuously.

I would suggest to write a batch file and insert it into a group policy's Scripts (Startup/Shutdown) or Scripts (Logon/Logoff) depending on your needs. This will provide the elevated privileges and you can have the batch file to do the following:

1. Detect if the registry key already exists (VBS or Batch depending on needs)

Ref: or

2. Apply registry file with /s option if not exists


Once the batch file is tested, add it into group policy and apply to the computers that need it. (
Or you can use group policy preferences to deploy registry settings
WEBINAR: 10 Easy Ways to Lose a Password

Join us on June 27th at 8 am PDT to learn about the methods that hackers use to lift real, working credentials from even the most security-savvy employees. We'll cover the importance of multi-factor authentication and how these solutions can better protect your business!

Tiras25Author Commented:
Hi guys, so to deploy via the Group Policy it only takes one key path.  My .reg has more than one.  
As for the bat file.  Renaming from .reg to .bat would that work?
Tiras25Author Commented:
Got it.  So if I stick that bat file into the \\domainname\sysvol that would apply anytime anyone login to the servers?
There is this video that will go thru GPO for scripts to run at logon.

2:15 onwards -

I would probably put the batch file on the file share and browse to it on the GPO.

There are other ways to do this too, which involves the Show Files button where you can copy and paste the batch and reg file so that it will replicate to other domain controllers. Using this, you just need to type the batch filename instead of browse.

Remember to test it out in a test environment.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.