Jump to content

cmdlines.txt question


Recommended Posts

If I want to have all of the regtweaks that I include set themselves to each and every username that I create during setup, and also for any new accounts created later, is this the order I should have my entries in cmdlines.txt?

[COMMANDS]

"REGEDIT /S regtweaks.reg"

"useraccounts.cmd"

So it runs all the regtweaks, then sets up the user accounts, which base their settings on the ones input into the default user account?

Thanks.

Link to comment
Share on other sites


Are you sure about that, as on the greenmachine site it says:

"Additional lines could contain calls to various programs and setup files, wrapped in quotes"

can someone please verify if I can have:

[COMMANDS]

"REGEDIT /S regtweaks.reg"

"useraccounts.cmd"

in my cmdlines.txt file???

Link to comment
Share on other sites

Okay so i've read in the unattended guide that if you want all of your user profiles to adopt your favourite regtweaks, you need to put that command in the cmdlines.txt file to run regtweaks.reg.

This then applies it to the default account doesn't it, because no one has actually logged on yet, not even the default administrator.

so because I would be running regtweaks.reg and "useraccounts.cmd" before anyone logs in at all, is this why it works?

Link to comment
Share on other sites

i dunno if you can use long file names or spaces in your cmdlines.txt commands, anyone know for sure?

try making a batch file (tweaks.cmd) that imports the reg tweaks, call the batch file from cmdlines.txt (this is how I used to do it)

Link to comment
Share on other sites

Crusher,May 5 2004, 08:48 PM] i dunno if you can use long file names or spaces in your cmdlines.txt commands, anyone know for sure?

try making a batch file (tweaks.cmd) that imports the reg tweaks, call the batch file from cmdlines.txt (this is how I used to do it)

yes you can

Link to comment
Share on other sites

  • 3 weeks later...

Hi, All!

I've decided to renew an old thread instead creating a new one, because my question fits the thread title.

I'm a little confused about cmdlines.txt syntax. Specifically, about relative path syntax. I'm planning to install MUI from CD, and call the installation from cmdlines.txt.

I've read GM's article on cmdlines.txt. I'll quote two paragraphs related to my question.

2) The only files copied from $OEM$ to the hard disk are those included in reserved subdirectories ($$, $1, C, D, etc). Files in the root of $OEM$ and subsequent, non-reserved directories (i.e. <CDDRIVE>:\$OEM$\SETUPS\) are NOT copied to the HDD.

3) You do not need to place your setup programs in $OEM$\$1\Installs. This is only interesting to do if you wish to access these programs AFTER the GUI reboot, when you are no longer able to access files on the CD, as you cannot know the drive letter (USUALLY D:, but it is hardware dependent). You can access the files on the CD from CMDLINES.TXT using relative paths (i.e. “.\SETUPS\SETUP1.EXE"), and they do NOT need to be copied to the HDD first.

I understand what I have to do based on the article. I'd like to get an explanation on why the period and the backslash are used in the relative path: ".\SETUPS\SETUP1.EXE"

What causes my confusion is the fact that

[COMMANDS]"RunOnceEx.cmd"

works when RunOnceEx.cmd and cmdlinest.txt are in the same root of $OEM$.

Assuming I have MUI files in $OEM$\MUI\ and cmdlines.txt is located in $OEM$. Will the following syntax work in cmdlines.txt (switches are fine, I know that)?

[COMMANDS]"MUI\muisetup.exe /i 0419 /d 0419 /r /s"

Thanks for your attention to my question.

Link to comment
Share on other sites

I think you can only launch one command via cmdlines.txt, though.  In other word, call a batch file which calls the other jobs.

In the windows XP/2003 setups you can launch more then one (at least two like i do), in the windows 2000 setup i wasn't able to launch two, there i was able to launch only one.

Link to comment
Share on other sites

@VAD:

The long answer ...

\SETUPS\SETUPS.EXE would refer to the SETUPS directory at the root of the CD, something like D:\SETUPS\SETUPS.EXE.

.\SETUPS\SETUPS.EXE would be relative to the local directory, in the typical case D:\$OEM$\SETUPS\SETUPS.EXE.

..\SETUPS\SETUPS.EXE would refer to SETUPS\SETUPS.EXE, relative to the parent directory, in this case again D:\SETUPS\SETUPS.EXE.

If CMD1.CMD is in the same directory, both "CMD1.CMD" and ".\CMD1.CMD" can be used to call the script, as well as possibly, "..\$OEM$\CMD1.CMD", or even "\$OEM$\CMD1.CMD".

To call REGEDIT, "REGEDIT.EXE" could be used, but ".\REGEDIT.EXE", and all the rest do not work.

When using MSIEXEC, the MSI installer, I seem to remember that when passing the filename of the MSI file, it was necessary to specify .\INSTALL.MSI, or MSIEXEC would look in the directory in which it resides: SYSTEM32.

Never having attempted do disect the DOS interpreter, I would suspect that the \, .\, and ..\ notations are expanded to the absolute paths, while notations that start directly with the file name, or directory name, are not expanded to the absolute path.

All that is, of course, based on my uneducated observation of what seems to be happening. For my purposes, that explanation works fine!

The short answer: yes, that syntax should be fine. Also, as my memory serves me ... I have used more than one command line in CMDLINES.TXT, even in Windows 2000.

Link to comment
Share on other sites

Assuming I have MUI files in $OEM$\MUI\ and cmdlines.txt is located in $OEM$. Will the following syntax work in cmdlines.txt (switches are fine, I know that)?
[COMMANDS]

"MUI\muisetup.exe /i 0419 /d 0419 /r /s"

Thanks for your attention to my question.

That will work perfectly!

If it does not work, try replacing the / with - , like this:

[Commands]

"MUI\muisetup.exe -i 0419 -d 0419 -r -s"

I had trouble getting it to work with the /, don't know why? :)

Link to comment
Share on other sites

The short answer: yes, that syntax should be fine.

Thanks, this is how I understood it. Also, thank you for this explanation:

\SETUPS\SETUPS.EXE would refer to the SETUPS directory at the root of the CD, something like D:\SETUPS\SETUPS.EXE.

.\SETUPS\SETUPS.EXE would be relative to the local directory, in the typical case D:\$OEM$\SETUPS\SETUPS.EXE.

..\SETUPS\SETUPS.EXE would refer to SETUPS\SETUPS.EXE, relative to the parent directory, in this case again D:\SETUPS\SETUPS.EXE.

Intuitively, I was thinking the same way too; however, I didn't feel like I could explain this as clear as you did, and then just ask for the confirmation ;-)

When using MSIEXEC, the MSI installer, I seem to remember that when passing the filename of the MSI file, it was necessary to specify .\INSTALL.MSI, or MSIEXEC would look in the directory in which it resides: SYSTEM32.

I think it applies only when you run MSI with silent switches. Sometimes information is specified in setup.ini, which points to the MSI file, so when setup.exe is executed, it calls MSI and runs the install according to the setup.ini. Well, that's offtopic, and not directly about MSI files, but I'd like to share what I've learned ;-) When I was playing with unattended installation of Office MUI, I noticed a file setup.ini in Files\Setup directory. Among other parameters there was the following section

[Display]

; The diplay section is used for overriding the default UI

;       Value           Default         Description

;       Display         full            Option to override the default UI

;                                       [none, quiet, basic, reduced, full]

;       CompletionNotice Yes            Option to display a setup completion

;                                       notice for otherwise quiet setup

;Display=None

;CompletionNotice=Yes

Thus setting

Display=quiet

CompletionNotice=No

produced a silent installation when running setup.exe without any parameters. (Alternatively, MST file could be preconfigured, and path to it could be specified in setup.ini.)

The point is that the path to MSI was as following

[MSI]

; The MSI section gives the name of the MSI file to install. This file must be in

; the same folder as Setup.exe, and both must be in the root of the installation

; tree.

MSI=MUI.MSI

Added:

If it does not work, try replacing the / with - , like this:

[Commands]

"MUI\muisetup.exe -i 0419 -d 0419 -r -s"

I had trouble getting it to work with the /, don't know why?  :)

Thanks for your comment. I didn't have troubles with / switches while running installation from RunOnceEx.cmd, though.

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