Help - Search - Members - Calendar
Full Version: Can you do regedit /s *.reg ?
MSFN Forums > Unattended Windows Discussion & Support > Application Installs

   
Google Internet Forums Unattended CD/DVD Guide
LazyBoy
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.
warrior1109
Why not merge them into a single .reg file?
totoymola
Hi. Try this. smile.gif

CODE
@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. tongue.gif

EDIT: Please change your regfile names to 1.REG instead of 001.REG.
BoardBabe
Why don't you just have one reg file? if yor going to apply it all anyway...
SiMoNsAyS
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
galvanocentric
QUOTE (totoymola @ Oct 17 2005, 02:40 AM) *
Hi. Try this. smile.gif

CODE
@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. tongue.gif

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


Small correction to your code, but otherwise it's fine:
CODE
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. :)
Yzöwl
Correction to your correction:
QUOTE
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. smile.gif
The original code was fine!
totoymola
QUOTE (Yzöwl @ Oct 30 2005, 03:36 PM) *
Correction to your correction:
QUOTE
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. smile.gif
The original code was fine!

Hahahahahah!!! laugh.gif biggrin.gif
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.