Jump to content

How To Use Cmdlines.txt Installing Applications?


Recommended Posts

I have read these articles, and I try to use cmdlines.txt for my Unattended XP CD

Importing Registry Settings To Default User

Small Questions

But I failed installing every batch file :)

What's the problem with my settings?

cmdlines.txt (in $OEM$ folder)

[commands]".\MAIN_BATCH.bat"

".\HOTFIXES.bat"

"REGEDIT /S .\REGFILE.REG"

MAIN_BATCH.bat (in $OEM$ folder)

@echo off

ECHO.

ECHO Eject CD...

CD_EJECT.VBS

ECHO.

ECHO Over the next few minutes you will see automated installations

ECHO of various sofware applications, windows updates, and registry

ECHO hacks being implemented. The computer will restart automatically

ECHO once the whole process has finished!

ECHO.

ECHO Removing useless shortcuts...

DEL "%AllUsersProfile%\Start Menu\Set Program Access and Defaults.lnk"

DEL "%AllUsersProfile%\Start Menu\Windows Catalog.lnk"

ECHO.

ECHO Install MSN Messenger 6.0.0602 Final

Applications\MsnMsgs.msi /QB

ECHO.

ECHO Install Yahoo Messenger 5.5.0 Build 1254

Applications\ymsgrtw.exe /s

pskill YPager.exe

ECHO.

ECHO Use Win2000 search

regsvr32 /u /s %windir%\srchasst\srchui.dll

ECHO.

ECHO Copy patched UXTheme.dll

REN %systemroot%\System32\dllcache\uxtheme.dll uxtheme.old

COPY uxtheme\uxtheme.dll "%systemroot%\System32\dllcache\"

REN %systemroot%\System32\uxtheme.dll uxtheme.old

COPY uxtheme\uxtheme.dll "%systemroot%\System32\"

ECHO.

ECHO Kill wscript.exe

PSKill wscript.exe

ECHO Applying Registry Tweaks

REGEDIT /S .\REGTWEAKS.REG

ECHO.

EXIT

Hotfixes
@echo off

ECHO.

ECHO Install 823718:Microsoft Data Access Components

Q823718.exe /T:%systemdrive%\install\tmp /C:"%systemdrive%\install\tmp\dahotfix.exe /q /n" /Q

EXIT

My $OEM$ folder

G:\WinXP_UnattendCD\install\$OEM$

REGFILE.REG

REGTWEAKS.REG

CMDLINES.txt

CD_EJECT.VBS

HOTFIXES.bat

MAIN_BATCH.bat

G:\WinXP_UnattendCD\install\$OEM$\$$\SYSTEM32

OEMINFO.INI

OEMLOGO.BMP

PSKILL.EXE

TWEAKUI.EXE

CDIMAGE.EXE

G:\WinXP_UnattendCD\install\$OEM$\APPLICATIONS

MSNMSGS.MSI

YMSGRTW.EXE

G:\WinXP_UnattendCD\install\$OEM$\HOTFIXES

Q823718.EXE

G:\WinXP_UnattendCD\install\$OEM$\UXTHEME

UXTHEME.DLL

Link to comment
Share on other sites


Of course I do.

My winnt.sif

[Data]
AutoPartition=0
MsDosInitiated="0"
UnattendedInstall="Yes"

[Unattended]
UnattendMode=FullUnattended
OemSkipEula=Yes
OemPreinstall=Yes
CrashDumpSetting=0
DisableDynamicUpdates=Yes
Hibernation=1
TargetPath=\WINDOWS
Repartition=No
UnattendSwitch="Yes"
WaitForReboot="No"

[GuiUnattended]
AdminPassword=*
EncryptedAdminPassword=NO
OEMSkipRegional=1
TimeZone=220
OemSkipWelcome=1

[Display]
BitsPerPel=32
Xresolution=1024
YResolution=768

[UserData]
ProductID=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
FullName="User"
OrgName="Company"
ComputerName=WinXP

[TapiLocation]
CountryCode=886
Dialing=Tone

[RegionalSettings]
LanguageGroup=9
Language=00000404

[Identification]
JoinWorkgroup=MSHOME

[Networking]
InstallDefaultComponents=Yes

[Components]
msmsgs=off
msnexplr=off
templates=off
fax=off
Clipbook=off
hypertrm=off
zonegames=off

Link to comment
Share on other sites

You don't have $OEM$ in install, do you? It should be in the root of your created CD.

This is my CD's Root

2003/10/23  PM 02:48    <DIR>          .
2003/10/23  PM 02:48    <DIR>          ..
2003/10/23  PM 01:58    <DIR>          $OEM$
2003/10/21  AM 02:10    <DIR>          BOOT
2003/10/21  AM 02:10    <DIR>          I386
2001/09/06  AM 04:00           213,830 BOOTFONT.BIN
2002/08/15  PM 02:19             8,953 spnotes.htm
2001/09/06  AM 04:00                10 WIN51
2001/09/06  AM 04:00                10 WIN51IP
2002/09/10  AM 06:39                 2 win51ip.SP1
2003/10/20  PM 10:20             2,048 xpboot.bin

First, I slipstream the Update Rollup 1 here

Second,I use this article to reduce my CD

Gosh - Unattended Secret: Reducing Size Of Source

(Winnt.sif is in BOOT folder)

Third, I copy WM9MM2.DirectX9b OPK.Pre-SP2 Hotfixes into I386\Update

and edit I386\svcpack.inf to install them.

Final, I failed using cmdlines.txt to install other applications. :/

Could someone share cmdlines.txt and the batch files?

I will really appreciate.

Link to comment
Share on other sites

My first question is whether CMDLINES.TXT is in fact parsed. Does ANYTHING happen that should from CMDLINES.TXT? You have calls to two batch files and a reg file. ANYTHING from the reg file? Before examening the actual files, make sure CMDLINES is found and parsed. It could be in the wrong place, could have the wrong name, could have invalid syntax. Simple test: create a CMDLINES.TXT like this

[COMMANDS] 
"SOL.EXE"

If, at the T-13 mark, you do not see the Solataire game, the problem is not IN CMDLINES.TXT, it is in finding it.

If you do see the solataire game, add items to your CMDLINES.TXT or batch files little at a time, until you hit a bug.

EDIT:: Guess I did not read all they way to the end... I could share my files, but they would not do you any good ... I do things a little differently (as I am sure some have noticed ...) First use the CMDLINES.TXT above, no batch files needed, and make sure that goes OK, so you know where to look further. Second, I am not sure of what you did to reduce your source size, but I often find those "unorthodox" methods expensive in debugging ... If the above does not help (i.e. NO solataire), make sure you did not overly reduce the source size. One last thing: I doubt it matters, but I have always seen [COMMANDS] in UPPERCASE.

Link to comment
Share on other sites

Do you have your directories reversed? It should be $oem$\install not install\$oem$? GreenMachine: whatever happened with the slipstream script that you and webmedic were working on? Do you still use it now that the rollup came out?

Link to comment
Share on other sites

It should be $oem$\install not install\$oem$?

That's why I asked if $OEM$ was in the right place. I vote for an error of this sort.

Yes, I stilll use the script after the RollUp. The RollUp is just the same as anyother hotfix, and I treat it accordingly. My script went overboard, and became an "All In One" script, which you can find out more about HERE

Link to comment
Share on other sites

Do you have your directories reversed? It should be $oem$\install not install\$oem$? GreenMachine: whatever happened with the slipstream script that you and webmedic were working on? Do you still use it now that the rollup came out?

If you use cmdlines.txt, you don't need to put files to $OEM$\install

Just put files in $OEM$ folder is fine.

I have noticed one thing may effect my CD

Could I use "del" in the batch files during cmdlines.txt?

Configuring Cmdlines.txt to Perform Tasks

I'm sure the cmdlines.txt is put in the correct folder

because it ejected my CD successfully. (It means cmdlines.txt call MAIN_BATCH.bat)

After eject my CD, the cmd.exe window disappear... :)

Link to comment
Share on other sites

Ah ha: you are saying that CMDLINES.TXT DOES run. Now on to step 2. You eject the CD, so we can say that MAIN_BATCH.bat does get run. The screen then disappears: sounds like a syntax or program error. Of course, you have tested your batch file buy just double clicking on it, right?

Yes, you can use DEL from a batch called in CMDLINES.TXT, just not in CMDLINES.TXT itself.

Applications\MsnMsgs.msi /QB
Where is this file? The above will evaluate to
<DISTRIBUTION>:\$OEM$\Applications\MsnMsgs.msi /QB
If not found, perhaps the MSIEXEC craps out, and takes the batch file with it. I would prefer to call it like
MSIEXEC.EXE /QB /I ".\MSNMSGS.MSI"
but it may be irrelevent.

In any event, as you are sure that the MAIN_BATCH.bat does run, we know the error is there. This saves you from having to do an new installation to test: just get the batch file running "stand alone", and you should be OK.

My opinions of CMDLINES.TXT are HERE

Link to comment
Share on other sites

Ahh... I found the possible reason

I use a wrong method calling CD_EJECT.VBS in main_batch.bat :)

The wrong method in main_batch.bat

CD_EJECT.VBS

without any switch, it stopped here

The right method

start CD_EJECT.VBS

and it continues to install.

Another question.

Does cmdlines.txt copy all the files during installation?

If it does, I have to put "patch uxtheme.dll" at the final step,and eject CD before patching?

If not, I can eject CD before installing applications.

Many thanks :rolleyes:

Link to comment
Share on other sites

I would say that is the culprit. I don't use VBS files, so I don't know how the interpreter treats them.

CMDLINES.TXT does not copy anything, unless you do it explicitly from your batch files. However, it makes more sense to me to leave the install files on the CD if you are installing at this point, and in that case you would perhaps be better off ejecting the CD as your last command, not your first. In terms of setup itself, there is no difference between ejecting at the begining or end, and if you do it last, you will know that you have CD access till the end. This may be important, as the current directory when parsing CMDLINES.TXT is <CD>:\$OEM$.

I use uxtheme.dl_ that I downloaded here somewhere, and just put that into the I386 directory before creating the CD. This avoids the on the fly copying (which I have never tried)

Link to comment
Share on other sites

  • 4 years later...

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