darksimoon Posted August 20, 2005 Posted August 20, 2005 hi friends 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 filesand the files are;::===regtweaks.cmd======@echo ontitle regtweakscolor 0bfor %%a in (*.reg) do call :addreg "%%~a"goto :eof:addregregedit /s %1goto :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" /fREG ADD %KEY%\090 /V 1 /D "REGEDIT /S %CDROM%\reg tweaks\regtweaks.cmd" /fREG ADD %KEY%\095 /VE /D "Cleaning Up and Rebooting" /fREG ADD %KEY%\095 /V 1 /D "%cdrom%\$OEM$\cmds\cleanup.cmd" /fEXIT::==================================
bmn Posted August 20, 2005 Posted August 20, 2005 this is my cmdlines.txt.and its working(tested a lot of times)[COMMANDS]"REGEDIT /S regtweaks.reg""REGEDIT /S setstartup.reg"
darksimoon Posted August 21, 2005 Author Posted August 21, 2005 [Try "cmd.exe .\reg tweaks\regtweaks.cmd"]it didnt worked out
Yzöwl Posted August 21, 2005 Posted August 21, 2005 (edited) See if this helps!regtweaks.cmd@echo off&title %~n0&color 0b&setlocal enableextensionspushd %~dp0&for %%a in ("*.reg") do call :addreg "%%~fa"popd&endlocal&goto :eof:addregregedit /s %1&&goto :eof<Edit>If this still fails to run each reg file, you should try changing the last line tostart "" /w regedit /s %1&&goto :eof or change the whole file to@echo off&title %~n0&color 0b&setlocal enableextensions&pushd %~dp0for %%a in ("*.reg") do start "" /w regedit /s "%%~fa"popd&endlocal&goto :eof</Edit> Edited August 21, 2005 by Yzöwl
darksimoon Posted August 21, 2005 Author Posted August 21, 2005 hi Yzöwl 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.
darksimoon Posted September 10, 2005 Author Posted September 10, 2005 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 enableextensionspushd %~dp0&for %%a in ("*.reg") do call :addreg "%%~fa"popd&endlocal&goto :eof:addregregedit /s %1&&goto :eof================================so of course i havent tried the other two codes. just a feedback as i promised.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now