Using winnt and winnt32 switches

The winnt.exe and winnt32.exe commands support several switches in addition to the temporary drive option explained in the previous topic. These switches enable you to specify the source location for the Windows 2000 files, specify an answer file for unattended installation, specify commands to execute at completion of Setup, and more. The following is the syntax for winnt.exe, and Table 1-1 lists the command switches for winnt.exe:

winnt [/s[:sourcepath]] [/t[:tempdrive]] [/u[:answer_file]]
[ic:ccc][/udf:id[,UDF_file]] [/r:folder] [/rx:folder] [/e:command] [/a]

Table 1-1. winnt.exe command switches

Option

Function

/s[: sourcepath ]

Location of Windows 2000 source files; must be full local or UNC pathname.

/t[: tempdrive ]

Location for temporary Setup files and installation partition.

/u:[ answer_file ]

Perform unattended Setup using specified answer file; requires /s option.

/udf:id[, UDF_file ]

Specify unique ID and use Unique Database File (UDF) to modify answer file for unattended Setup. ID determines which answers in UDF file are used.

/r[: folder ]

Create optional folder that remains after installation; specify folder name as folder.

/rx[: folder ]

Copy folder during Setup but delete after installation.

/e

Specify command to be executed after GUI-mode Setup completes.

/a

Enable accessibility options.

The following is the syntax for winnt32.exe, and Table 1-2 lists the command switches for winnt32.exe:

winnt32 [/s:sourcepath] [/tempdrive:drive_letter]
[ic:ccc][/unattend[num]:[answer_file]] [/copydir:folder_name]
[ic:ccc][/copysource:folder_name] [/cmd:command_line]
[ic:ccc][/debug[level]:[filename]] [/udf:id[,UDF_file]]
[ic:ccc][/syspart:drive_letter] [/checkupgradeonly] [/cmdcons]
[ic:ccc][/m:folder_name] [/makelocalsource] [/noreboot]

Table 1-2. winnt32.exe command switches

Option

Function

/s: sourcepath

Location of Windows 2000 source files; you can specify multiple sources with multiple /s switches.

/tempdrive: drive_letter

Location for temporary Setup files and Windows 2000 installation partition.

/unattend

Upgrade previous version of Windows 2000 in unattended Setup mode; implies acceptance of the End User License Agreement.

/unattend[ num ]:[ answer_file ]

Fresh install in unattended mode; num is the number of seconds between file copy and system restart and answer_file is the answer file for Setup options.

/copydir: folder_name

Copy optional folder specified by folder to the system root folder during Setup; use multiple switches to copy multiple folders. Folder(s) remain after Setup completes.

/copysource: folder_name

Copy optional folder specified by folder to the system root folder during Setup; use multiple switches to copy multiple folders. Folder(s) deleted after Setup completes.

/cmd: command_line

Execute specified command after Setup but before final system restart.

/debug[ level ]:[ filename ]

Log information to specified file; levels are 1 (errors), 2 (warnings), 3 (information), and 4 (detailed).

/udf:id[, UDF_file ]

Specify unique ID and use Unique Database File (UDF) to modify answer file for unattended Setup. ID determines which answers in UDF file are used.

/syspart: drive_letter

Copy Setup startup files to drive, mark drive active for install in another computer, which continues Setup on boot. Requires /tempdrive switch. Not available for Windows 9x.

/checkupgradeonly

Analyze system for upgrade compatibility but don’t install; creates Upgrade.txt (Windows 9x) or Winnt32.log (Windows NT) log file in current OS system root folder.

/cmdcons

Install Recovery Console during Setup.

/m: folder_name

Copy files from specified folder (if it exists) rather than default source location.

/makelocalsource

Copy all installation source files to local hard disk; for cases where CD is not available after Setup starts.

/noreboot

Don’t restart system after final Setup phase.

Get Windows 2000 Quick Fixes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.