[GuiRunOnce]. You can also launch additional commands during setup using the [GuiRunOnce] section of an unattended setup answer file. As with cmdlines.txt, this section contains a list of one or more commands that you want Setup to run after the installation is complete. However, in this method, Setup doesn't run the command lines until the first user logs on to the system after Win2K is installed. The [GuiRunOnce] section of an unattended answer file (e.g., unattend.txt) uses the syntax:
[GuiRunOnce]
"command_1"
"command_2"
. . .
"command_x"
Where "command_1" and "command_2" refer to the commands you want Setup to run and the order in which you want Setup to run them.
If any of the applications launched by the commands in the [GuiRunOnce] section cause a reboot, you should determine whether the application can be launched in a way that suppresses the system reboot (e.g., through a special command-line switch). Otherwise, if the system reboots, Setup automatically removes all the commands in the [GuiRunOnce] section and the remaining commands won't run. If any of the applications [GuiRunOnce] runs require the presence of the Microsoft Windows Explorer shell, they will fail because [GuiRunOnce] runs these commands before Explorer is present. If you can't address either of these problems for an application, consider using a different method to deploy the application.
[SetupParams]. A third, undocumented method for running additional post-Setup commands in Win2K involves the special [SetupParams] section in the answer file. Using [SetupParams] lets you put everything into one file rather than create an additional file as cmdlines.txt requires you to do. However, this approach suffers from a significant limitation: You can enter only one command. In addition, the command you enter under the [SetupParams] section executes immediately after Setup completes.
To use this method, employ the following format to create a section called [SetupParams] in your answer file:
[SetupParams]
UserExecute="c:\myapp\setup.exe/q/u"
This example causes Setup to launch a program called Setup.exe in the C:\myapp folder. The command you add under [SetupParams] must begin with the keyword UserExecute=, followed by the path to the application. You can omit the path only if the referenced application is in the %systemroot% or %system root%system32 folder or search path. You must enclose the pathname in quotes unless you use an 8.3 filename-compliant version of the pathname.
Launching an Unattended Installation
After you've prepared the individual elements of your unattended installation, you're ready to pull them together and launch the installation. Regardless of whether you launch Setup from a DOS boot disk or over the network, you use a command line similar to the following example:
WINNT (or WINNT32) /U[:answerfile] /S:sourcefolder
As with NT, Win2K Setup (i.e., winnt.exe or winnt32.exe) automatically looks for a file called unattend.txt if you don't specify a filename after the /U switch, and /S can be a folder on a local or redirected drive or a Uniform Naming Convention (UNC) pathname to a network share (e.g., \\FILESERVER\I386).
When upgrading NT and Win9x systems, you can use a trick to improve the performance of Win2K Setup's file-copying phase and balance the resulting load across multiple servers. You use a special command-line switch that takes advantage of a little-known load-balancing feature in winnt32.exe. To use this feature, create distribution folders that contain identical sets of files on multiple servers. Then enable client workstations to use multiple source folders (as many as eight folders) by launching winnt32.exe with multiple /S options specified at the command line.
Unattended installations are an important deployment method in Win2K, and learning about them is definitely a worthwhile investment of your time. Knowing how to customize unattended installations to your organization's needs can make a significant dent in the amount of time you spend swapping disks on client desktops.
End of Article
Installing Mass Storage Device Support
Installing support for an unsupported mass storage device in a Win2K distribution folder involves the following process: First, create a subfolder named Textmode under the $OEM$ subfolder in your Win2K distribution folder. Next, you need to copy the mass storage device driver files that you received from the hardware vendor (e.g., on a 3.5" disk, CD-ROM, or through a download) to the Textmode subfolder. This set of files usually includes at least a .sys, .inf, and txtsetup.oem file, and might include a .dll file.
Joseph Reyes December 27, 2003