Jump to content

Recommended Posts

Posted

hi friends :hello:

i have an approach and a problem along with it. it's about registy tweaks:

i think i should apply regtweaks at two different stages without differentiating whether it include HKEY_CURRENT_USER branches or not. the firts is at cmdlines.txt stage(in order to apply them for all users); and the second is at runonceex.cmd stage.

pls don't direct me to unattended.msfn.org. they dont explain this case clearly (2004 guide). when reading it i understand from what they say is, i have to make two regtweaks.reg. the first is as usual and the second is just including the HKEY_CURRENT_USER brances. the normal must be placed at C:\XPCD\$OEM$\$1\install\

and must be executed from runonceex.cmd. and the second which includes HKEY_CURRENT_USER must be placed at C:\XPCD\$OEM$\ folder and must be executed from cmdlines.txt (i have read approximately 300 pages of this forum and still reading but this case is still confusing and foggy)

and the second approach is (this is where i have a problemi think) that: i want to keep my regtweaks one by one with different names involving its relevant matter. so i made a folder called reg tweaks and put them together. and made a regtweaks.cmd file to apply them but its seems they are not being applied. :(

when setup goes, regtweak.cmd appears for a short while when isn't long enough to apply all tweaks one by one. i know this because in the normal windows environment when click on regtweak.cmd it works and applies. and it takes a little time.

here are my relevant folder structure and files;

$OEM$

cmdlines.txt

|

reg tweaks(folder)

| regtweaks.cmd

| Context Menus.reg

| power settings.reg

| and the other *.reg files

|

cmds(folder)

runonceex.cmd

and other cmd files

and the files are;

::===regtweaks.cmd======

@echo on

title regtweaks

color 0b

for %%a in (*.reg) do call :addreg "%%~a"

goto :eof

:addreg

regedit /s %1

goto :eof

::==================

::====cmdlines.txt=======

[COMMANDS]

"useraccounts.cmd"

".\reg tweaks\regtweaks.cmd"

".\cmds\RunOnceEx.cmd"

::==================

::===relevant part of my runonceex.cmd========

REG ADD %KEY%\090 /VE /D "Importing Registry Tweaks" /f

REG ADD %KEY%\090 /V 1 /D "REGEDIT /S %CDROM%\reg tweaks\regtweaks.cmd" /f

REG ADD %KEY%\095 /VE /D "Cleaning Up and Rebooting" /f

REG ADD %KEY%\095 /V 1 /D "%cdrom%\$OEM$\cmds\cleanup.cmd" /f

EXIT

::==================================


Posted

this is my cmdlines.txt.and its working(tested a lot of times)

[COMMANDS]

"REGEDIT /S regtweaks.reg"

"REGEDIT /S setstartup.reg"

Posted (edited)

See if this helps!

regtweaks.cmd

@echo off&title %~n0&color 0b&setlocal enableextensions
pushd %~dp0&for %%a in ("*.reg") do call :addreg "%%~fa"
popd&endlocal&goto :eof
:addreg
regedit /s %1&&goto :eof

<Edit>

If this still fails to run each reg file, you should try changing the last line to

  • start "" /w regedit /s %1&&goto :eof

or change the whole file to

@echo off&title %~n0&color 0b&setlocal enableextensions&pushd %~dp0
for %%a in ("*.reg") do start "" /w regedit /s "%%~fa"
popd&endlocal&goto :eof

</Edit>

Edited by Yzöwl
Posted

hi Yzöwl :hello:

i am very glad to see you since i know you'll help me as before. thank you very much again. i will try your suggestion as soon as i get home. and i will give a feedback for others to get most use of it. :)

  • 3 weeks later...
Posted

hello againg yzwöl :)

hey friend i wanted you to know that the 1st code is succesful (for applying reg files in a folder.)

=================================

@echo off&title %~n0&color 0b&setlocal enableextensions

pushd %~dp0&for %%a in ("*.reg") do call :addreg "%%~fa"

popd&endlocal&goto :eof

:addreg

regedit /s %1&&goto :eof

================================

so of course i havent tried the other two codes. just a feedback as i promised. :)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...