larciel Posted March 15, 2008 Posted March 15, 2008 (edited) I had multiple lines in cmdlines.txt because I copied to same file from my UAXP cd.After a searching I saw win2k setup might not support multi-line cmdlines so I just put 'runonceex.cmd'at t-13 stage, I see CMD window so runnonceex.cmd seems to be working, but none of the commands work after first logon.Here's my runnonce .. Can anyone point me in a right direction? Thankscmdow @ /HID@echo off:RegKey:1-10 - Drivers:15-25 - System Related:26-35 - nero adobe mediaFOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\CDROM_NT.5 SET CDROM=%%i:SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /f:REG ADD %KEY%\001 /VE /D "" /f:REG ADD %KEY%\001 /V 1 /D "%systemdrive%\none1.bat" /f:REG ADD %KEY%\002 /VE /D "" /f:REG ADD %KEY%\002 /V 1 /D "REGEDIT /S %systemdrive%\regtv1.reg" /fREG ADD %KEY%\003 /VE /D "" /fREG ADD %KEY%\003 /V 1 /D "%systemdrive%\themes.cmd" /fREG ADD %KEY%\004 /VE /D "" /fREG ADD %KEY%\004 /V 1 /D "%CDROM%\wpi\wpi.hta" /fREG ADD %KEY%\937 /VE /D "Finishing Installation 0 of 3" /fREG ADD %KEY%\937 /V 1 /D "%SystemDrive%\DPsFnshr.exe" /fREG ADD %KEY%\938 /VE /D "Finishing Installation 1 of 3" /fREG ADD %KEY%\938 /V 1 /D "%systemdrive%\none1.bat" /fREG ADD %KEY%\939 /VE /D "Finishing Installation 2 of 3" /fREG ADD %KEY%\939 /V 1 /D "%CDROM%\winapp\cmd2.cmd" /fREG ADD %KEY%\940 /VE /D "Finishing Installation 3 of 3" /fREG ADD %KEY%\940 /V 1 /D "%CDROM%\winapp\finish.cmd" /f:REG ADD %KEY%\0 /VE /D "" /f:REG ADD %KEY%\0 /V 1 /D "%CDROM%\winapp\" /fEXIT Edited March 15, 2008 by larciel
trb48 Posted March 15, 2008 Posted March 15, 2008 I am pretty sure that you need to put quotes around your commands, like this:"regedt32 /s AdminStartMenuIcons.reg"Once you do that everything should work just fine.
MHz Posted March 16, 2008 Posted March 16, 2008 AFAIK, W2K does not execute the RunOnceEx key at startup so you may need to invoke the action from the RunOnce key.Add the below commands to the end of your RunOnceEx.cmd and test it.SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceREG ADD %KEY% /V "_RunOnceEx" /D "rundll32.exe iernonce.dll,RunOnceExProcess" /f
larciel Posted March 16, 2008 Author Posted March 16, 2008 AFAIK, W2K does not execute the RunOnceEx key at startup so you may need to invoke the action from the RunOnce key.Add the below commands to the end of your RunOnceEx.cmd and test it.SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceREG ADD %KEY% /V "_RunOnceEx" /D "rundll32.exe iernonce.dll,RunOnceExProcess" /fIt's mind boggling, well at least very inconvenient doing win2k install after years of xp install.. I still like small footprint and snapiness of win2k over xp but this problem along with unable to do quick format in setup might deter me from setting up my home pc back to win2k as I do alot of reinstall.I'll test it today. I hope it works
Yzöwl Posted March 16, 2008 Posted March 16, 2008 The lines preceded by colons, (:), are not doing what you were hoping for either. Lines preceded by two colons, (::), are considered as comments and not read, those with just one are still picked up.
Martin H Posted March 16, 2008 Posted March 16, 2008 Sorry, i don't know the answer to your problem, but atleast i can tell you that 'RunOnceEx' + multi-line 'cmdlines.txt' entries does work on Win2K also...
MHz Posted March 16, 2008 Posted March 16, 2008 Sorry, i don't know the answer to your problem, but atleast i can tell you that 'RunOnceEx' + multi-line 'cmdlines.txt' entries does work on Win2K also...Looks like I have been corrected. Thanks for informing.@larcielI amended your script with changes suggest by Yzöwl. You can also use goto a label to jump over lots of comments so the interpreter quickly skips them and is good for header comments at the top of your script.cmdow @ /HID@echo offgoto :main:: RegKey:: 1-10 - Drivers:: 15-25 - System Related:: 26-35 - nero adobe media:mainFOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO ( IF EXIST %%i:\CDROM_NT.5 SET CDROM=%%i:)SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /f:: REG ADD %KEY%\001 /VE /D "" /f:: REG ADD %KEY%\001 /V 1 /D "%systemdrive%\none1.bat" /f:: REG ADD %KEY%\002 /VE /D "" /f:: REG ADD %KEY%\002 /V 1 /D "REGEDIT /S %systemdrive%\regtv1.reg" /fREG ADD %KEY%\003 /VE /D "" /fREG ADD %KEY%\003 /V 1 /D "%systemdrive%\themes.cmd" /fREG ADD %KEY%\004 /VE /D "" /fREG ADD %KEY%\004 /V 1 /D "%CDROM%\wpi\wpi.hta" /fREG ADD %KEY%\937 /VE /D "Finishing Installation 0 of 3" /fREG ADD %KEY%\937 /V 1 /D "%SystemDrive%\DPsFnshr.exe" /fREG ADD %KEY%\938 /VE /D "Finishing Installation 1 of 3" /fREG ADD %KEY%\938 /V 1 /D "%systemdrive%\none1.bat" /fREG ADD %KEY%\939 /VE /D "Finishing Installation 2 of 3" /fREG ADD %KEY%\939 /V 1 /D "%CDROM%\winapp\cmd2.cmd" /fREG ADD %KEY%\940 /VE /D "Finishing Installation 3 of 3" /fREG ADD %KEY%\940 /V 1 /D "%CDROM%\winapp\finish.cmd" /f:: REG ADD %KEY%\0 /VE /D "" /f:: REG ADD %KEY%\0 /V 1 /D "%CDROM%\winapp\" /fEXITI tested adding into my registry within XP (looked good viewed in regedit) and then running iernonce.dll manually to invoke RunOnceEx and it performs as well as expected. So there maybe something else causing the issue. Perhaps a good idea to check the Cmdlines.txt file (ensure the name is correct and entries within are correct).
larciel Posted March 16, 2008 Author Posted March 16, 2008 (edited) I have no idea why it doesn't workhere's my cmdline.txt (edited to multi line)[COMMANDS]"ROE.exe 937""REGEDIT /S regtv1.reg""runonceex.cmd""themes.cmd"ROE.exe is BTS's driverpacks finisher. and it's the only thing that runs in first logon@mhz, tried your edit but it still doesn't go .. cmdow @ /HID@echo off::RegKey::1-10 - Drivers::15-25 - System Related::26-35 - nero adobe mediaFOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\CDROM_NT.5 SET CDROM=%%i:SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /f::REG ADD %KEY%\001 /VE /D "" /f::REG ADD %KEY%\001 /V 1 /D "%systemdrive%\none1.bat" /f::REG ADD %KEY%\002 /VE /D "" /f::REG ADD %KEY%\002 /V 1 /D "REGEDIT /S %systemdrive%\regtv1.reg" /fREG ADD %KEY%\004 /VE /D "" /fREG ADD %KEY%\004 /V 1 /D "%CDROM%\wpi\wpi.hta" /fREG ADD %KEY%\938 /VE /D "Finishing Installation 1 of 3" /fREG ADD %KEY%\938 /V 1 /D "%systemdrive%\none1.bat" /fREG ADD %KEY%\939 /VE /D "Finishing Installation 2 of 3" /fREG ADD %KEY%\939 /V 1 /D "%CDROM%\winapp\cmd2.cmd" /fREG ADD %KEY%\940 /VE /D "Finishing Installation 3 of 3" /fREG ADD %KEY%\940 /V 1 /D "%CDROM%\winapp\finish.cmd" /fSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceREG ADD %KEY% /V "_RunOnceEx" /D "rundll32.exe iernonce.dll,RunOnceExProcess" /f::REG ADD %KEY%\0 /VE /D "" /f::REG ADD %KEY%\0 /V 1 /D "%CDROM%\winapp\" /fEXIT Edited March 16, 2008 by larciel
MHz Posted March 17, 2008 Posted March 17, 2008 here's my cmdline.txt (edited to multi line)cmdlineS.txtPerhaps just a typo mistake as you got the filename correct in the topic title but failed in your previous post. But that is all it takes for something to go wrong if you named it cmdline.txt which setup may not recognize. The entries seem fine. You can remove the "rundll32.exe iernonce.dll,RunOnceExProcess" entry from runonceex.cmd as that seems not the issue.ROE.exe is BTS's driverpacks finisher. and it's the only thing that runs in first logonWell, that is the 1st entry of cmdlines.txt and you state it works. Strange... try changing the entry order.[COMMANDS]"runonceex.cmd""themes.cmd""REGEDIT /S regtv1.reg""ROE.exe 937"If you need to for debugging, try to add an entry of "REGEDIT" in cmdlines.txt and check the RunOnceEx key to ensure the entries were added at T-12.
larciel Posted March 18, 2008 Author Posted March 18, 2008 After several reinstall, I know one thing, only the 'runonceex.cmd is skipped.After windows install. I manually ran runonceex.cmd and watched the Registry location. The parameters do not appear.I don't see anything wrong with runonce code.. Any guess?
MHz Posted March 18, 2008 Posted March 18, 2008 Perhaps you do not have Reg.exe on Windows 2000? I looked at Windows 2000 source files and I cannot see Reg.exe in a cab file. I looked at a website here and quote the vital information below.The Microsoft ® Windows NT ® Server 4.0 Resource Kit contains, among many others, REG.EXE.In Windows 2000 REG.EXE is available on the Windows installation CD-ROM, but has to be installed manually (on the CD-ROM run "\SUPPORT\TOOLS\SETUP.EXE").As of Windows XP, REG.EXE is a native command.I see it within the "\SUPPORT\TOOLS\SUPPORT.CAB" that SETUP.EXE with the same folder probably extracts. I feel sorry for all the testing that you have done only to find out Reg.exe is perhaps missing for use. You maybe able to copy needed files into "$OEM$\$$\System32" using the OEMPreinstall option in Winnt.sif.
larciel Posted March 18, 2008 Author Posted March 18, 2008 (edited) well. I don't know how everyone else did their runonceex.cmd w/out the reg.exe. You hit it right on the head; I put reg.exe file to system32 folder and it works now! Thank you very muchThanks again! Edited March 19, 2008 by larciel
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now