Jump to content

cmdlines.cmd


DaveXP

Recommended Posts

The plot thickens. If I copy the cmd file to my desktop and run it from there, it works FINE. I wonder if one of the commands prior to the launch of the program isn't allowed...

Any idea? I think we're on the right track here...

Link to comment
Share on other sites


What exactly do you have in CMDLINES.TXT? I dislike working there, as it has special rules and syntax. I have just two lines in my CMDLINES.TXT:

[COMMANDS]
".\INSTALLS.CMD"

Everything is done from the one CMD file INSTALLS.CMD. If you have more than one, test them all from the command line. If you do have only one, or UPDATE.CMD is the first one to run, it must be something else. What does CMDLINES.TXT look like?

Link to comment
Share on other sites

Well, when I ran it from the desktop, it acted similar to how it does during windows setup. A cmd window pops up, then a second where the batch file actually runs (the first one closes after the second one appears). So it would appear the file is being called, but then being exited out of for whatever reason immediately after it's called.

Is it possible that CLS, TITLE, or @ECHO OFF would be invalid syntax during that point of setup? I'm going to try REMing them out to see what happens.

Link to comment
Share on other sites

Maybe CLS, but that don't make much sense. For what it's worth:

@ECHO OFF

TITLE Post Install Setup

:: ---------- Update MS Components

ECHO Starting DirectX 9 Install.
START "DirectX 9 Install" /WAIT ".\DIRECTX\DXSETUP.EXE" /opk

You don't need the CLS - you're off having a beer ... Try again from the setup without CLS (the only difference), and put a pause at the begining. Though, if there is any DOS box that pops up at all, it must be at list hitting CMDLINES.TXT.

Link to comment
Share on other sites

OK... I have a few points... (this is my first post here)

Your hotfixes are in c:\updates, correct? lose the %systemdrive% variable since the unattended install makes you use C anyways, right?

Your hotfixes are on the CD in $OEM$\$1\updates right? If they aren't that's where they should be.

Try losing the @echo off command so you are able to view everything, and ad a PAUSE statement at the end of it. (only for the purposes of testing)

You are walking the edge not using qchain.exe at the end of the installs.

and.. I will take a second to show you MY method for installing hotfixes :)

Create a directory called $OEM$\$1\hotfixes 
Create sub directories called IE and WIN
Create sub directories beneath the WIN directory called 1 and 2

So, here is what you should have

$OEM$\$1
 HOTFIXES
    WIN
       1  
       2
    IE

There are two different kinds of hotfixes for Windows and one for IE (the reason for the directory structure) One type of hotfix uses -u -q -z switches where as the other kind uses /q:a /r:n switches. Drop the first kind in the 1 directory and the second kind in the 2 directory. If you have trouble determining which is which you can launch it from a prompt with a /? switch to find out.  Drop the corresponding IE hotfixes in the IE directory.

Drop QCHAIN.EXE in the HOTFIXES directory.
Create a batch file in the HOTFIXES directory called HOTFIXES.BAT with the following contents

-------------------
:START
@ECHO OFF
DIR /B c:\hotfixes\win\1\>>c:\hotfixes\win1.txt
DIR /B c:\hotfixes\win\2\>>c:\hotfixes\win2.txt
DIR /B c:\hotfixes\IE\>>c:\hotfixes\ie.txt

FOR /f %%i IN (c:\hotfixes\win1.txt) DO ECHO %%i -u -q -z>>hotfixrun.bat
FOR /f %%i IN (c:\hotfixes\win2.txt) DO ECHO %%i /q:a /r:n>>hotfixrun.bat
FOR /f %%i IN (c:\hotfixes\ie.txt) DO ECHO %%i /q:a /r:n>>hotfixrun.bat
ECHO qchain.exe>>hotfixrun.bat

hotfixrun.bat

RD /S/Q c:\hotfixes
--------------------

I myself use the [GuiRunOnce] for hotfixes and service packs because of problems I have run into in the past. Windows is not completely finished updating it's files when the cmdlines.txt file is launched. It is possible for Windows to overwrite one of your updated files with an older version.

Oh, I forgot to add... the beauty of using the script I created is that every time you have a new hotfix you just drop it in it's corresponding directory and it automatically uses it. :rolleyes:

Link to comment
Share on other sites

Un4given1 - isn't that what WFP is for? And yes, my directory structures are correct.

Thanks for the input, though :). I've always liked the loop method for installing hotfixes, except that I like to see what hotfix is being installed at any given point. Call me old fashioned I guess :rolleyes:

Link to comment
Share on other sites

If you get to the first "pause" then you are back to the point where you put in either a bunch of "pause"s, or you try the LOGFILETXT thing again - onto the HDD not the CD ... It also would seem to be the CLS if that is all you changed, and that does not make a lot of sense to me ... the verdict is?

Link to comment
Share on other sites

I wanted to also add... You should keep in mind that when you are running your CMDLINES.TXT file it is using it's local directory which is "C:\$WIN_NT$.~LS\$OEM$" If you wish to create a log file you should do more than include a file name. Use an exact location such as c:\logfile.txt

Link to comment
Share on other sites

Please, unforgiven, your off the track here. I also believe you are wrong, using outdated info. Open a command prompt from your CMDLINES.TXT file, and tell me where you are. $OEM$ is no longer automatically copied to the hard disk as I recall ... Furthermore, as he has autopartition to 0 in WINNT.SIF, there is no guarantee that he is installing on the C drive, why I said %SYSTEMDRIVE%\LOGFILES.TXT. Have you been following this thread, or did you just jump in at the end?

Link to comment
Share on other sites

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