CMDLINES.TXT could perhaps be one of the hardest concepts to understand, hence why it gets its very own page.
CMDLINES.TXT is located in the $OEM$ directory. During setup, CMDLINES.TXT is parsed (note the word parsed not executed) at T-12. To have an overview of it's correlation to the rest of setup, take a peak at this timeline.
[COMMANDS] "REGEDT32.EXE /S tweaks.reg" "batch.cmd"
Above is an example of a CMDLINES.TXT file.
The file ALWAYS starts with the line: [COMMANDS]
Now comes the portion that is parsed to be executed. Each following line MUST be enclosed in quotation marks ( " ).
- CMDLINES.TXT is a VERY limited commandline interface. This means that MOST traditional DOS commands are not available, however external commands (REGEDIT32.EXE , REG.EXE, etc. ) are available.
If the program to be executed is in the PATH variable (open a command prompt and type ECHO %PATH%) then you do not have to include the full path, the same is true if it is also in the current directory.
The current directory when CMDLINES.TXT is executed is $OEM$.
This means that if batch.cmd is in the $OEM$ directory, then you just have simply type batch.cmd. If however, batch.cmd was located in another directory, you will have to include the full path. To help facilitate this, read the comments below.
- If the file/program you wish to execute is in a folder within $OEM$, and the path to the folder is $OEM$/Folder/batch.cmd , then type
the ./ is a reference to the current directory, so in execution the line will actually become
- If the file/program is located in a folder in the root of the CD, say
The ../ tells the interpreter to get the path to the parent directory of the current directory, so it will become