Occasionally I need to put registry entries into batch files to use in login scripts, unattended installers, etc. While it's pretty easy to add one or two registry commands to a batch file using reg.exe, when there is a large amount of registry data, it becomes tedious. I usually just end up merging an external reg file in those cases, which I would like to avoid, since it ruins the self-contained nature of the batch file. Does anybody know of any tools which can automatically convert a .reg file to a series of REG ADD and REG DELETE commands? This would make life a lot easier! Thanks.


I think it could lead to trouble as the registry can contain extended characters like in unicode format and so on and bat files might not handle that so great, depending on what you do with the strings.

I've always called separate .reg files for this and it feels more natural to separate your "code-base" in as small chunks as possible and not use one giant file for everything.

It sounds like it should be quite easy to write a script to do the basics of it though if nothing comes up ^^

  • That's usually the best solution indeed, just having them separate. But sometimes it's helpful to have everything in one file, particularly when you have to distribute that file to users and would rather avoid having to distribute several files. Thanks for the input though.
    – nhinkle
    Sep 26 '10 at 9:12

I've used https://www.sordum.org/8478/reg-converter-v1-2/ to convert basic .reg files into .bat files and have had reasonable success - although it would probably depend on the types of keys (as mentioned).

New contributor
Svenkle is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.