MSFN Forum: cant apply regtweaks at cmdlines.txt stage - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

cant apply regtweaks at cmdlines.txt stage is my approach right ? and what is wrong Rate Topic: -----

#1 User is offline   darksimoon 

  • Member
  • PipPip
  • Group: Members
  • Posts: 106
  • Joined: 29-May 05

Posted 20 August 2005 - 04:36 AM

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
::==================================


#2 User is offline   bmn 

  • Unattended Friend
  • PipPipPip
  • Group: Members
  • Posts: 398
  • Joined: 05-October 04

Posted 20 August 2005 - 06:10 AM

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

[COMMANDS]
"REGEDIT /S regtweaks.reg"
"REGEDIT /S setstartup.reg"

#3 User is offline   jbm 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 626
  • Joined: 16-September 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 20 August 2005 - 08:42 AM

Try "cmd.exe .\reg tweaks\regtweaks.cmd"

#4 User is offline   darksimoon 

  • Member
  • PipPip
  • Group: Members
  • Posts: 106
  • Joined: 29-May 05

Posted 21 August 2005 - 07:06 AM

[Try "cmd.exe .\reg tweaks\regtweaks.cmd"]

it didnt worked out :(

#5 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,195
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 21 August 2005 - 08:30 AM

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>

This post has been edited by Yzöwl: 21 August 2005 - 08:49 AM


#6 User is offline   darksimoon 

  • Member
  • PipPip
  • Group: Members
  • Posts: 106
  • Joined: 29-May 05

Posted 21 August 2005 - 09:07 AM

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. :)

#7 User is offline   darksimoon 

  • Member
  • PipPip
  • Group: Members
  • Posts: 106
  • Joined: 29-May 05

Posted 10 September 2005 - 04:12 AM

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. :)

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy