MSFN Forum: CMDLINES.TXT and Win2k - MSFN Forum

Jump to content



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

CMDLINES.TXT and Win2k Can't get it to work. Rate Topic: -----

#1 User is offline   larciel 

  • Member
  • PipPip
  • Group: Members
  • Posts: 241
  • Joined: 06-December 03

Posted 15 March 2008 - 03:15 PM

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? Thanks

 
cmdow @ /HID
@echo off

:RegKey
:1-10 - Drivers
:15-25 - System Related
:26-35 - nero adobe media

FOR %%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\RunOnceEx

REG 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" /f

REG ADD %KEY%\003 /VE /D "" /f
REG ADD %KEY%\003 /V 1 /D "%systemdrive%\themes.cmd" /f

REG ADD %KEY%\004 /VE /D "" /f
REG ADD %KEY%\004 /V 1 /D "%CDROM%\wpi\wpi.hta" /f

REG ADD %KEY%\937 /VE /D "Finishing Installation 0 of 3" /f
REG ADD %KEY%\937 /V 1 /D "%SystemDrive%\DPsFnshr.exe" /f

REG ADD %KEY%\938 /VE /D "Finishing Installation 1 of 3" /f
REG ADD %KEY%\938 /V 1 /D "%systemdrive%\none1.bat" /f

REG ADD %KEY%\939 /VE /D "Finishing Installation 2 of 3" /f
REG ADD %KEY%\939 /V 1 /D "%CDROM%\winapp\cmd2.cmd" /f

REG ADD %KEY%\940 /VE /D "Finishing Installation 3 of 3" /f
REG 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\" /f

EXIT
 

This post has been edited by larciel: 15 March 2008 - 03:17 PM



#2 User is offline   trb48 

  • Newbie
  • Group: Members
  • Posts: 12
  • Joined: 27-December 05

Posted 15 March 2008 - 05:16 PM

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.

#3 User is offline   MHz 

  • SendToA3X v1.7
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,634
  • Joined: 02-August 04

Posted 15 March 2008 - 09:52 PM

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\RunOnce
REG ADD %KEY% /V "_RunOnceEx" /D "rundll32.exe iernonce.dll,RunOnceExProcess" /f


:)

#4 User is offline   larciel 

  • Member
  • PipPip
  • Group: Members
  • Posts: 241
  • Joined: 06-December 03

Posted 16 March 2008 - 03:25 AM

View PostMHz, on Mar 15 2008, 07:52 PM, said:

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\RunOnce
REG ADD %KEY% /V "_RunOnceEx" /D "rundll32.exe iernonce.dll,RunOnceExProcess" /f


:)


It'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 :)

#5 User is offline   Yzöwl 

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

Posted 16 March 2008 - 06:04 AM

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.

#6 User is offline   Martin H 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 802
  • Joined: 24-November 06
  • OS:none specified

Posted 16 March 2008 - 08:46 AM

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

#7 User is offline   MHz 

  • SendToA3X v1.7
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,634
  • Joined: 02-August 04

Posted 16 March 2008 - 10:26 AM

View PostMartin H, on Mar 17 2008, 12:46 AM, said:

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.

@larciel
I 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 off
goto :main
:: RegKey
:: 1-10 - Drivers
:: 15-25 - System Related
:: 26-35 - nero adobe media

:main
FOR %%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\RunOnceEx

REG 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" /f

REG ADD %KEY%\003 /VE /D "" /f
REG ADD %KEY%\003 /V 1 /D "%systemdrive%\themes.cmd" /f

REG ADD %KEY%\004 /VE /D "" /f
REG ADD %KEY%\004 /V 1 /D "%CDROM%\wpi\wpi.hta" /f

REG ADD %KEY%\937 /VE /D "Finishing Installation 0 of 3" /f
REG ADD %KEY%\937 /V 1 /D "%SystemDrive%\DPsFnshr.exe" /f

REG ADD %KEY%\938 /VE /D "Finishing Installation 1 of 3" /f
REG ADD %KEY%\938 /V 1 /D "%systemdrive%\none1.bat" /f

REG ADD %KEY%\939 /VE /D "Finishing Installation 2 of 3" /f
REG ADD %KEY%\939 /V 1 /D "%CDROM%\winapp\cmd2.cmd" /f

REG ADD %KEY%\940 /VE /D "Finishing Installation 3 of 3" /f
REG 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\" /f

EXIT
 

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

#8 User is offline   larciel 

  • Member
  • PipPip
  • Group: Members
  • Posts: 241
  • Joined: 06-December 03

Posted 16 March 2008 - 01:29 PM

I have no idea why it doesn't work

here'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 media

FOR %%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\RunOnceEx

REG 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" /f

REG ADD %KEY%\004 /VE /D "" /f
REG ADD %KEY%\004 /V 1 /D "%CDROM%\wpi\wpi.hta" /f

REG ADD %KEY%\938 /VE /D "Finishing Installation 1 of 3" /f
REG ADD %KEY%\938 /V 1 /D "%systemdrive%\none1.bat" /f

REG ADD %KEY%\939 /VE /D "Finishing Installation 2 of 3" /f
REG ADD %KEY%\939 /V 1 /D "%CDROM%\winapp\cmd2.cmd" /f

REG ADD %KEY%\940 /VE /D "Finishing Installation 3 of 3" /f
REG ADD %KEY%\940 /V 1 /D "%CDROM%\winapp\finish.cmd" /f

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
REG 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\" /f

EXIT
 

This post has been edited by larciel: 16 March 2008 - 03:43 PM


#9 User is offline   MHz 

  • SendToA3X v1.7
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,634
  • Joined: 02-August 04

Posted 17 March 2008 - 01:48 AM

View Postlarciel, on Mar 17 2008, 05:29 AM, said:

here's my cmdline.txt (edited to multi line)

cmdlineS.txt

Perhaps 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.

Quote

ROE.exe is BTS's driverpacks finisher. and it's the only thing that runs in first logon

Well, 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.

#10 User is offline   larciel 

  • Member
  • PipPip
  • Group: Members
  • Posts: 241
  • Joined: 06-December 03

Posted 18 March 2008 - 01:16 AM

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?

#11 User is offline   MHz 

  • SendToA3X v1.7
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,634
  • Joined: 02-August 04

Posted 18 March 2008 - 05:36 AM

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.

www.robvanderwoude.com/ntregistry.html said:

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. :blink: You maybe able to copy needed files into "$OEM$\$$\System32" using the OEMPreinstall option in Winnt.sif.

#12 User is offline   larciel 

  • Member
  • PipPip
  • Group: Members
  • Posts: 241
  • Joined: 06-December 03

Posted 18 March 2008 - 01:28 PM

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 much


Thanks again!

This post has been edited by larciel: 18 March 2008 - 10:28 PM


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