Command Line Options for WINNT.EXE and WINNT32.EXE in Windows 2000
Windows 2000 uses unintuitive winnt.exe and winnt32.exe executables for installation. These programs take a variety of command line parameters that are poorly documented and, in some cases, even incorrectly documented. For example, even Microsoft's extensive Windows 2000 Resource Kit doesn't correctly list all of the command line parameters these programs can use. So to my knowledge, this is the most complete list anywhere.
December 31, 1999
Like NT before it, Windows 2000 uses unintuitive winnt.exe and winnt32.exe executables for installation. These programs take a variety of command line parameters that are poorly documented and, in some cases, even incorrectly documented. For example, even Microsoft's extensive Windows 2000 Resource Kit doesn't correctly list all of the command line parameters these programs can use. So to my knowledge, this is the most complete list anywhere. Let's take a look.
WINNT.EXE
The winnt.exe program is used to peform a clean ("full") install of Windows 2000 from an MS-DOS or Windows 3.x environment. This can be an existing installation of MS-DOS/Windows 3.x or a boot disk. You cannot upgrade an existing version of Windows to Windows 2000 with winnt.exe.
This program takes the following form, where parameters are surrounded by brackets []:
winnt [/a:] [/e:] [/r:>] [/rx:>] [/s:<source path>] [/t[:<temp drive>]] [/u[:<answer file>]] [/udf:<ID>[,<UDB file>]
Command line parameters explained:
/a:
Enables accessibility options.
/e:
Allows you to specify a set of commands that will execute when the GUI portion of Setup is complete. Typically, this parameter is used to execute a set of commands located in a file called cmdlines.txt. Ex: winnt /E:cmdlines.txt
/r:
Allows you to include one or more sub-directories of modifications to a Windows 2000 installation. For example, you might include a directory called /my_drivers under the i386 directory that contains drivers for devices that were not included on the Windows 2000 CD-ROM. You can use the parameter multiple times to specify multiple modifications folders. Ex: winnt /R:my_drivers
/rx:
The same as the /R: parameter except that Setup will delete the temporary modifications folder(s) when installation is complete.
/s:
Specifies the location of the Windows 2000 installation files (the i386 directory). By default, winnt will look for these files in the current folder. The source path must be fully qualified in the form of Drive letter:Path or \ServerSharePath. Ex: winnt /S:C:i386
/t:
Specifies the drive on which to place temporary files used by Setup during installation. Setup will typically create these files on the C: drive or another partition that has enough free space by default. On a dual-drive SCSI system, Setup will run faster if you place the temporary files on the drive that Windows 2000 isn't being set up on. Ex: winnt /T:D:
/u:
Specifies the name of the optional answer file that can be used by Setup to install Windows 2000 without prompting the user. This option also requires the use of the /S: parameter. Use of an answer file to perform installations of Windows 2000 will be covered in a future showcase. Ex: winnt /U:answers.txt /S:D:i386
/udf:
Specifies a unique identifier (ID) that is used to modify an answer file used during installation. This prevents every unattended install of Windows 2000 from appearing to be identical. The UDB file (*.udb) contains unique values for each identifier. If you use this option, the installation files cannot be on a CD-ROM. Ex: winnt /U:answers.txt /S:D:i386 /udf:mobile_user1,mobile_users.udb
WINNT32.EXE
The winnt32.exe program is used to perform a clean ("full") or upgrade installation of Windows 2000 from Windows 95, Windows 98, or Windows NT only.
This program takes the following form, where parameters are surrounded by brackets []:
winnt32 [/checkupgradeonly] [/cmd:<command line>] [/cmdcons] [/copydir:>] [/copysource:<folder name>] [/debug[<level>][:<file name>]] [/m:<folder name>] [/makelocalsource] [/noreboot] [/s:<source path>] [/syspart:<drive letter>] [/tempdrive:<drive letter>] [/udf:<ID>[,<UDB file>]] [/unattend[<seconds>][:<answer file>]]
/checkupgradeonly:
This parameter prevents Setup from installing Windows 2000 and simply verifies whether the current operating system can upgrade to Windows 2000. Ex: winnt32 /checkupgradeonly
/cmd:
Allows you to specify a set of commands that will execute when the GUI portion of Setup is complete. Typically, this parameter is used to execute a set of commands located in a file called cmdlines.txt. Ex: winnt32 /cmd:cmdlines.txt
/cmdcons:
Adds a Recovery Console option to boot.ini so that you can enter this command line mode to repair a failed installation or non-booting system.
/copydir:
Allows you to include one or more sub-directories of modifications to a Windows 2000 installation. For example, you might include a directory called /my_drivers under the i386 directory that contains drivers for devices that were not included on the Windows 2000 CD-ROM. You can use the parameter multiple times to specify multiple modifications folders. Ex: winnt32 /copydir:my_drivers
/copysource:
The same as the /copydir: parameter except that Setup will delete the temporary modifications folder(s) when installation is complete.
/debug:
Creates a debug log file at the specified warning level (0 to 4, where 0 is severe errors, 1 is errors, 2 is warnings, 3 is information, and 4 is detailed information) . When this option is not specified, Setup creates a log file with a warning level of 2 (that is, all errors of level 2 or lower are written to the log). Ex: winnt32 /debug:4:setup.log
/m:
Specifies an alternate location for setup installation files that will be used instead of files in the default location. In other words, you might have a default installation set location of D:i386 but specify an alternate location of D:SP1. On a file by file basis, Setup will look in D:SP1 first: If the file isn't there, it will use the version in D:i386 instead. This option will become more important as Service Packs and other updates to the Windows 2000 installation set become available. Ex: winnt32 /m:d:SP1
/makelocalsource:
Copies all installation files to the local hard drive so that the CD-ROM can be removed during the first reboot. This option is handy if the CD-ROM becomes unavailable for some reason during Setup.
/noreboot:
Instructs Setup to not reboot the computer after the initial phase of Setup is complete. This will allow you to execute other commands before rebooting. Ex: winnt32 /noreboot
/s:
Specifies the location of the Windows 2000 installation files (the i386 directory). By default, winnt32 will look for these files in the current folder. Unlike its winnt.exe equivalent, this parameter can be used multiple times to specify multiple source locations, which will speed installation when you are installing over a network. The source path must be fully qualified in the form of Drive letter:Path or \ServerSharePath. Ex: winnt /S:C:i386
/syspart:
Allows you to prepare a hard drive for the installation of Windows 2000 so that the drive can be moved to another computer to finish installation. This parameter will mark the disk as active, copy the installation files to the drive and execute the first phase of Setup. After you move the drive, you can complete Setup on the new system. This parameter must be used with the /tempdrive parameter, and both parameters must point to the same partition. This parameter can only be executed on a system that is running Windows NT or Windows 2000. Ex: winnt32 /syspart:D: /tempdrive:D:
/tempdrive:
Specifies the drive on which temporary files will be placed during the installation of Windows 2000. Setup will typically create these files on the C: drive or another partition that has enough free space by default. On a dual-drive SCSI system, Setup will run faster if you place the temporary files on the drive that Windows 2000 isn't being set up on. Ex: winnt32 /tempdrive:D:
/udf:
Specifies a unique identifier (ID) that is used to modify an answer file used during installation. This prevents every unattended install of Windows 2000 from appearing to be identical. The UDB file (*.udb) contains unique values for each identifier. If you use this option, the installation files cannot be on a CD-ROM. Ex: winnt32 /udf:mobile_user1,mobile_users.udb
/unattend:
Upgrades the previous version of Windows in unattended mode so that no user interaction is required. If you specify the answer file option, Setup will run in unattended mode but obtain its user-definable settings from an answer file you supply. This will be covered in a future Technology Showcase. The optional seconds option, for use only on Windows NT 4.0 upgrades, specifies the number of seconds Setup will wait to reboot after it finishes copying files. Ex: winnt32 /unattend:unattend.txt and winnt32 /unattend
Conclusions
Sure, you can simply run setup.exe in the root of the Windows 2000 CD-ROM, but there are a lot of advanced options you can explore by checking out the command line parameters for winnt.exe and winnt32.exe. I'd like to keep this page as up-to-date as possible: If you know of any inacuraccies here, especially missing parameters, please contact me and I'll make any necessary changes.
About the Author
You May Also Like