Does anybody know ow to export multiple reg keys to one .reg file using a cmd (batch) command?
I've Googled til my eyes are sore but the only answer I can see is on Experts Exchange and I'm not gonna pay to be told it's not possible.
HELP
Maybe use reg.exe to create multiple .reg files, then
for each but first .reg and finally - concatenate the first with all newly created ones?
Code: Select all
find /v "Windows Registry Editor Version" %%name>_%%name
Thanks m^(2), as usual you're way ahead of me here.
I'm using this for a simple portable launcher (I don't get on with Nsis or Autohotkey) so the separate application may be too much.
I've already exported to separate reg files using the regedit E/ switch how can I merge them?
Is this a manual process or a Reg.exe capability?
Also
(too many questions I know)
will it be worth it just to make the data folder look neater?
I'm using this for a simple portable launcher (I don't get on with Nsis or Autohotkey) so the separate application may be too much.
I've already exported to separate reg files using the regedit E/ switch how can I merge them?
Is this a manual process or a Reg.exe capability?
Also
(too many questions I know)
will it be worth it just to make the data folder look neater?
Manual process.
Untested code:
Untested code:
Code: Select all
::before using the code below, use reg.exe to have all .reg files in the current directory
set passed_first=false
for %%reg in .\*.reg do call :behead_reg %%reg
for %%reg in .\*.reg_ do call :append_reg %%reg
goto:eof
:behead_reg
if "%passed_first%"=="false" (
set passed_first=true
set first=%1
) else (
find /v "Windows Registry Editor Version" %1>%1_
del %1
)
goto :eof
:append_reg
if NOT "%1"=="%first%" (
echo %1>>%first%
del %1
)
goto :eof