Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Sign in to follow this  
LazyBoy

Can you do regedit /s *.reg ?

Recommended Posts

I have some reg files I wanna apply to windows at the end of my program installation. I numbered them 001.reg to 005.reg

Right now I have:

regedit /s %systemdrive%\registry\000.reg

regedit /s %systemdrive%\registry\001.reg

regedit /s %systemdrive%\registry\002.reg

regedit /s %systemdrive%\registry\003.reg

regedit /s %systemdrive%\registry\004.reg

regedit /s %systemdrive%\registry\005.reg

Can I just have one line instead? Like

regedit /s %systemdrive%\registry\*.reg

I was testing it and it didn't seem to get the second one and on.

Share this post


Link to post
Share on other sites

Hi. Try this. :)

@CLS & @ECHO OFF
SETLOCAL ENABLEEXTENSIONS

:: IMPORT A SERIES OF REGISTRY FILES. (1.REG TO 5.REG)
:: PLACE ALL YOUR REG FILES ALONG WITH THIS COMMAND SCRIPT IN THE SAME FOLDER.
FOR /L %%X IN (1, 1, 5) DO REGEDIT /S %%X.REG

EXIT

Warning: I did not test this. :P

EDIT: Please change your regfile names to 1.REG instead of 001.REG.

Edited by totoymola

Share this post


Link to post
Share on other sites

maybe different files are for different purposes.

i usually split my tweaks into different files b/c i is hard to scroll 5k lines xD

Share this post


Link to post
Share on other sites
Hi. Try this. :)

@CLS & @ECHO OFF
SETLOCAL ENABLEEXTENSIONS

:: IMPORT A SERIES OF REGISTRY FILES. (1.REG TO 5.REG)
:: PLACE ALL YOUR REG FILES ALONG WITH THIS COMMAND SCRIPT IN THE SAME FOLDER.
FOR /L %%X IN (1, 1, 5) DO REGEDIT /S %%X.REG

EXIT

Warning: I did not test this. :P

EDIT: Please change your regfile names to 1.REG instead of 001.REG.

Small correction to your code, but otherwise it's fine:

FOR /L %X IN (1,1,5) DO REGEDIT /S %X%.REG
Or:
FOR /L %X IN (1,1,5) DO REG /IMPORT %X%.REG
Depending on personal preference.
Just needed a bit of tweaking with the environmentals. :)

Share this post


Link to post
Share on other sites

Correction to your correction:

FOR /L %X IN (1,1,5) DO REGEDIT /S %X%.REG

Or:

FOR /L %X IN (1,1,5) DO REG /IMPORT %X%.REG

Depending on personal preference.

Just needed a bit of tweaking with the environmentals. :)

The original code was fine!

Share this post


Link to post
Share on other sites
Correction to your correction:
FOR /L %X IN (1,1,5) DO REGEDIT /S %X%.REG

Or:

FOR /L %X IN (1,1,5) DO REG /IMPORT %X%.REG

Depending on personal preference.

Just needed a bit of tweaking with the environmentals. :)

The original code was fine!

Hahahahahah!!! :lol::D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×