Tech Tips / Windows 2000 Professional / Installation and Configuration

Perform an unattended setup

While unattended setup is generally most applicable in a wide-scale deployment effort, it can be a useful tool in small networks for duplicating new systems. Unattended setup can even be useful on a single workstation. For example, you might use a workstation for beta testing or other functions that require you to start from scratch frequently. Developing an unattended setup process for the workstation could simplify reinstalling Windows 2000 when necessary.

You need a little background in how Setup works to understand how to develop an unattended installation procedure. Setup installs a small set of temporary files to the hard disk that acts as a limited-function copy of Windows 2000, and performs the full installation. During the GUI portion of Setup the user has to specify installation options such as language, installation location, and so on. A wizard presents these options, and when the wizard completes, Setup uses the provided information to perform the installation.

You can automate the setup process to bypass user input and provide those answers instead through a setup text file. You can also perform other steps during setup including installing applications, running applications upon completion of setup, and creating additional folders and copying other files, as part of the process.

You could create an answer file for an unattended installation of Windows 2000, but that would be like developing a Web page by writing HTML code in Notepad. You could do it, but why bother when there are better ways? The Microsoft Windows 2000 Resource Kit includes a tool called the Setup Manager that, in effect, prompts you for the installation information, then builds the setup file from your answers. The result is a text file that you can use with the Windows 2000 Setup program (Winnt.exe or Winnt32.exe) to automatically install Windows 2000.

You can use the Setup Manager to create a new setup file, modify an existing one, or, perhaps most useful for individual installations, create a setup file from the current computer configuration. This, in effect, lets you take a snapshot of the computer and use that snapshot to recreate the installation during setup. The wizard is self-explanatory and you should have little trouble specifying options and creating the text file.

When it's time to perform the installation, run Winnt.exe or Winnt32.exe from a command line to specify the setup file. The syntax for Winnt.exe is as follows:

  Winnt.exe /u:UnattendFileName

For Winnt32.exe, the syntax is as follows:

  Winnt32.exe /unattend:UnattendFileName

Automatically installing a particular Windows 2000 configuration through Setup is just one phase of duplicating systems with the least amount of effort. The next step is to install applications automatically so that the system takes essentially no effort to prepare for day-to-day use.

As mentioned above, there's a Resource Kit tool you can use to create answer files for unattended setup. Sysdiff.exe helps you take a snapshot of an existing system and use that snapshot to create a difference file that Setup can use to automatically install the applications and their registry settings.

Here's how Sysdiff works: You install and configure Windows 2000 on a system to use as a baseline system. You then use Sysdiff to take a snapshot of the system. Next, you install the applications on the system and reconfigure it as necessary for those applications. Then you use Sysdiff again to create a difference file that details the difference between the baseline and the finished installation. You can then use that difference file during unattended setup to automatically add applications and registry settings to the system. Sysdiff will either create an archive file containing the application files and other data, or you can create an .inf file that simply directs Setup to create the necessary .ini and registry entries. You can incorporate other methods (such as a run-once batch file) to actually copy the files into place. This latter option is best when you need to install a lot of applications that would otherwise result in a huge difference file.

Contact Us | Authors | Subject Index | RSS Feeds

Copyright ©2007