Share via


Advanced Sysdiff

Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Published: January 1, 1999

By Lee Grigsby

Microsoft Windows NT Operating System

Advanced Sysdiff

On This Page

Abstract
Introduction
Chapter 1 Getting Started
Chapter 2 Sysdiff.exe
Chapter 3 Advanced Sysdiff Deployment
Chapter 4 Advanced Sysdiff Alternatives
For More Information

Abstract

This supplement to the Microsoft Windows NT Deployment Guide: Automating Windows NT Setup provides new information and procedures that were unavailable at the publication of the initial Windows NT Deployment Guide.

Microsoft Windows NT includes many tools and features that can be used to automate the setup process. This supplement further addresses the use of Sysdiff.exe in such a manner as to allow you to install sound, tape, video, and other devices through the use of the Sysdiff Pre-Installation tool as a part of the deployment process. You will find detailed information and examples of this installation procedure in the following chapters.

Introduction

This supplement to the Microsoft Windows NT Deployment Guide: Automating Windows NT Setup provides new information and procedures that were unavailable at the publication of the initial Windows NT Deployment Guide. This supplement is not designed to replace the previous version, but is to be used in conjunction with the Deployment Guide, by Information Systems professionals whose task it is to install either Windows NT Workstation or Windows NT Server on many computers.

Microsoft Windows NT includes many tools and features that can be used to automate the setup process. This supplement further addresses the use of Sysdiff.exe in such a manner as to allow you to install sound, tape, video, and other devices through the use of the Sysdiff Pre-Installation tool as a part of the deployment process. You will find detailed information and examples of this installation procedure in the following chapters.

Chapter 1 Getting Started

This chapter includes an overview of the Microsoft Windows NT deployment tools, steps to automate the deployment process, a partial listing of what can and cannot be accomplished in a Windows NT deployment, and details about creating a distribution share for Windows NT.

What Microsoft Windows NT Deployment Tools Can Do

You can do the following with the Windows NT deployment tools:

  • Install many standard productivity applications that do not have their own automated installation process. Standard productivity applications are applications that do not run either as services or install services on the system.

  • Install the core Windows NT operating system. The core Windows NT operating system consists of the base items required during text mode and GUI mode setup to achieve a functioning installation of the Windows NT operating system.

  • Install the core hardware components. Core hardware components include SCSI drivers, display drivers, mouse drivers, keyboard drivers, and the type of processor used (hardware abstraction layer, or HAL).

  • Install Windows NT retail services and protocols. Retail services and protocols include items listed in the Services and Protocol sections of the Network utility in Control Panel.

  • Install Windows NT service packs during the installation process.

  • Install a limited amount of additional undetected hardware components such as display adapters, sound adapters, tape backup devices, printers, and other components, excluding network adapters and/or devices that require changes to the bindings.

What Microsoft Windows NT Deployment Tools Cannot Do

You cannot do the following with the Windows NT deployment tools:

  • Pre-install applications that run as services using the System Difference tool.

  • Pre-install multiple hardware profiles. Windows NT 4.0 supports the use of multiple hardware profiles. Hardware profiles can only be configured using the System utility in Control Panel on a completely installed Windows NT 4.0 system.

  • Install multiple language versions of Windows NT.

  • Uninstall Windows NT. Windows NT 4.0 does not have an uninstall procedure. To remove Windows NT 4.0 on a FAT partition, boot from an MS-DOS disk and run sys.com c: to remove the Windows NT boot sector, and then delete the directories created by Windows NT Setup. If the system is NTFS, you must delete and re-create the partition to remove Windows NT.

  • Configure Windows NT Auditing. Windows NT Auditing is an advanced feature of Windows NT and there is no interface during setup for this option.

  • Configure Windows NT Replication. Windows NT Replication is an advanced feature of Windows NT and there is no interface during setup for this option.

  • Install Windows NT Server Macintosh Services or AppleTalk Protocol. Macintosh Services and AppleTalk Protocol cannot be installed by using an unattended installation; manual installation and configuration are required.

Tools Used with Windows NT Deployment

Setup Manager Creating a Windows NT 4.0 Setup Script File (Unattend.txt)

Setup Manager is the starting point for building a basic Windows NT setup script. Setup Manager is located in the Support\Deptools directory on the Windows NT 4.0 retail compact disc. Setup Manager does not require any special installation procedure. The utility can be run from the compact disc or copied to a directory and run from the hard disk.

System Difference Tool: Sysdiff.exe

The System Difference tool enables you to automatically distribute and install applications and limited hardware devices during or after Windows NT setup. This tool can significantly reduce deployment time and costs. It can be used to record the changes made to your system when an application or device, excluding network adapters, is installed. Sysdiff can capture changes in a "package" and then "apply" or install the package on another system of the same type during or after the setup process. Only versions of this file updated by Service Pack 2 and/or dated April 30, 1997, or later should be used.

Windows NT Registry Tools

Regedit.exe

Regedit.exe is a utility supplied with Windows NT for working with the registry. Regedit.exe is very similar to the one provided with Microsoft Windows 95. If you are familiar with the Import and Export features used often in Windows 95, the same functionality is provided with Windows NT. For examples of how to use Regedit.exe with Windows NT, see Chapter 5, "Customizing Windows NT," in the Windows NT Deployment Guide: Automating Windows NT Setup.

Regedt32.exe

Regedt32.exe is a utility supplied with Windows NT for working with the registry hives. Regedt32.exe provides features that Regedit.exe does not provide. Regedt32.exe is used to modify the default registry hive supplied with the Windows NT 4.0 operating system prior to installation of Windows NT. For examples of how to use Regedt32.exe, see Chapter 5, "Customizing Windows NT," in the Windows NT Deployment Guide: Automating Windows NT Setup.

Regini.exe

Regini.exe is a Windows NT 4.0 Resource Kit utility that provides the ability to make simple modifications to the SYSTEM and SOFTWARE registry hives of the Windows NT registry. Regini.exe also provides the ability to apply or change security to the registry. Regini.exe is included with the Windows NT 4.0 Resource Kit. For examples of how to use Regini.exe, see Chapter 5, "Customizing Windows NT," in the Windows NT Deployment Guide: Automating Windows NT Setup.

Client Connectivity Software

If you plan to install Windows NT from a network distribution point on systems with newly formatted hard disks, you will need to build a client disk that includes a network client. If you have Windows NT Server, a network client is provided on the Windows NT Server retail CD in the Clients\Msclient directory.

Windows NT Setup: Winnt.exe and Winnt32.exe

Windows NT includes both a 16-bit and a 32-bit version of Setup. Both provide the same basic functionality; however, the 32-bit version, Winnt32.exe, will only run on Windows NT and should be used to upgrade an existing installation of Windows NT.

Winnt.exe and Winnt32.exe Command-Line Parameters

winnt [/s[:]sourcepath] [/t[:]tempdrive] [/i[:]inffile] 
[/u[:scriptfile]] [/r[x]:directory] [/e:command] 

/s[:] sourcepath

Specifies the source location of Windows NT files. Must be a full path of the form x:\[path] or \\server\share[\path]. The default is the current directory.

/t[:] tempdrive

Specifies a drive to contain temporary setup files. If not specified, Setup will attempt to locate a drive for you.

/i[:] inffile

Specifies the file name (no path) of the setup information file. The default is Dosnet.inf.

/b

Floppyless operation (requires /s).

/u:

Unattended operation and optional script file (requires /s).

/r:

Specifies an optional directory to be installed under the %SystemRoot% directory (multiple **/r:**directory_name options may be specified). The **/r:**directory_name must exist under the i386 distribution share point directory. This directory may be referenced during certain sections of an unattended install using the following path statement:

     %systemroot%\directory_name\  

This directory remains under %SystemRoot% after the completion of Windows NT Setup.

/rx:

Specifies an optional directory to be copied below the local install source ($win_nt$.~ls) and distribution share point name directory tree during installation. This directory may be referenced during certain sections of an unattended install using the following path statement:

     drive_letter:\$win_nt$.~ls\distribution_share_point_ 
     name; (typically i386)\directory_name\  

These directories, along with the Windows NT local source files, are removed at the completion of Windows NT Setup.

/e:

Specifies the command to be run at the end of the GUI mode setup.

Note: The /e: option is very useful when you do an upgrade of Windows NT.

/w

Used with Winnt.exe only for starting Setup from within Windows 3.x or Windows 95. The /b option is disabled in this mode.

Steps to Automating a Standard Windows NT Deployment

Step 1 Build the Windows NT Setup Script File (Unattend.txt)

Start by creating a basic Windows NT setup script. You can create this script by using one of the examples included in this document or by using the Windows NT Setup Manager. After you have created and tested your basic script, add the more advanced options of the Windows NT setup script. For syntax, parameters, and more details on creating your setup script, see Chapter 2, "The Windows NT Workstation 4.0 Setup Script File (Unattend.txt)," in the Windows NT Deployment Guide: Automating Windows NT Setup. For information on automating your process beyond what is possible with the Windows NT Setup script, review Chapter 5, "Customizing Windows NT," in the Windows NT Deployment Guide: Automating Windows NT Setup.

Step 2 Build Pre-Installation Packages Using the System Difference Tool (Sysdiff.exe)

Use the System Difference (Sysdiff) tool to automate pre-installation of applications and limited hardware devices during Windows NT Setup. Sysdiff will be addressed further later in this guide.

Step 3 Create a Process to Configure Computer-Specific Information

Create a Uniqueness Database (UDB) file or create computer-specific setup script files. You have several options for building a setup process that includes configuring systems with computer-specific information without requiring user interaction during setup. For more information, see Chapter 3, "Configuring Machine-Specific Information," in the Windows NT Deployment Guide: Automating Windows NT Setup.

Step 4 Build a Process to Automate Your Distribution Method

The final step in this process is distributing the Windows NT source files and any other files to each computer. You can use a network distribution point, specific hard disk drive duplication methods, software distribution tools such as Microsoft Systems Management Server, or a local device such as a compact disc. If you are installing Windows NT on a newly formatted hard disk, you will need a boot disk to either access the network or, possibly, access a local device.

Building the Distribution Server

Before you begin the process of automating Windows NT Setup, you must build a distribution server. In most cases, the best distribution point is a network server. Make sure you have read, write, and change privileges on the network server you use.

Step 1 Copy the Windows NT Source Files

To build the distribution server, copy Windows NT source files from the Windows NT retail CD to your network server. For Intel and Intel-compatible processors, copy the i386 directory and all of its contents to your network server. For RISC-based processors, such as Alpha computers, copy the Alpha directory and all of its contents to your network server.

Step 2 Copy Custom Files Using the $OEM$ Directory

Windows NT setup includes a feature that can be used to automatically copy directories, standard MS-DOS 8.3 files, and any tools needed for your automated installation process to the local hard disk during setup. This feature is based on a predefined directory name and structure. If you include this directory name and structure in the root of your distribution point, the files and directories will be copied to your local hard disk during Windows NT Setup.

The predefined directory name is $OEM$. If Windows NT Setup finds the $OEM$ directory in the root of the distribution point, it will copy all of the files found in this directory to the temporary directory created during the text mode portion of Windows NT Setup.

Note: The Application Pre-Installation Tool (Sysdiff.exe) is used to prepare the files needed for the Advanced Sysdiff procedures and to create the $OEM$ directory structure described in this paper. By using Sysdiff.exe to create the $OEM$ directory, you eliminate the likelihood of errors that may occur if you create the $OEM$ directory and subdirectories manually. In addition, because Sysdiff.exe also automatically handles long file names, you will not have to create the necessary $$Rename.txt files. For more information about Sysdiff.exe, see Chapter 4, "Windows NT 4.0 Application Pre-Installation Tool (Sysdiff.exe)," in the Windows NT Deployment Guide: Automating Windows NT Setup. For more information about the $$Rename.txt file, see "Converting Short File Names to Long File Names" later in this chapter.

Structure of the Distribution Share Point

The following shows the directory structure of the distribution share point

\Distribution_directory

\$OEM$
\Textmode
\$$
\Net
\Display
\Drive_letter
\
\Drive_letter

where:

The Distribution_directory includes the Windows NT source files and the $OEM$ directory.

The $OEM$ directory includes:

  • The Cmdlines.txt file. This text file contains commands you want to run during Windows NT Setup. This file can be used to customize your Windows NT installation.

  • All files needed to run any commands included in Cmdlines.txt. For example, if you include the following command

     "regedit.exe /s autolog.reg" 
    
you would copy Regedit.exe and Autolog.reg to the $OEM$ directory.
  • The Textmode directory. This directory contains the hardware-dependent files that Setup Loader and Text Mode Setup install to the target computer. These files can include OEM HALs, SCSI, keyboard, video, and pointing device drivers, and Txtsetup.oem, which directs the loading and installing of these components.

  • The $$ directory. This directory contains the system files (new files or replacements for retail files) that you want to copy to the various subdirectories of your system root directory when Windows NT is installed. The structure of this directory must match the structure of a standard Windows NT installation, where $OEM$\$$ matches %WinDir%, $OEM$\$$\System32 matches %WinDir%\System32, and so on. Each subdirectory should contain the files that need to be copied to the corresponding system directory on the target computer. This directory should also contain $$Rename.txt, which lists all files that need to be renamed, such as files in 8.3 format that must change to long file names.

    For example, if you install Windows NT in a directory named C:\Winnt and you want Setup to copy a custom bit map file, Mybitmap.bmp, to the C:\Winnt directory, you can copy Mybitmap.bmp to the Distribution_directory\$OEM$\$$ directory.

  • The Net directory. This directory contains only subdirectories, each of which contains the files for a particular OEM network component (network cards, network services, and network protocol). The network portion of Windows NT Setup uses files in this directory.

  • The Display directory. This directory includes files for OEM-supplied video drivers.

  • The Drive_letter directory. This directory includes any files or directories you want Setup to copy to a drive specified by drive_letter. This directory should also contain $$Rename.txt, which lists all files that need to be renamed, such as files in 8.3 format that must change to long file names. For more information, see the "Converting Short File Names to Long File Names" section later in this chapter.

    For example, to create a directory named Data and copy files to this directory on drive D, you would create a directory with the following name on your distribution share and copy all of the files you want Setup to copy to this directory:

    Distribution_directory\$OEM$\D\Data

Converting Short File Names to Long File Names

Tip If your MS-DOS tools cannot copy directories with path names longer than 64 characters, you can use short file names for the directories and then use $$Rename.txt to rename them later. For more information see Microsoft Knowledge Base article 169632, "Unattended Err Msg: Setup Was Unable to Create the Following..."

Windows NT Setup uses a special file, $$Rename.txt, which contains information on converting short file names to long file names. You can create the file manually using a text editor or automatically by using the System Difference tool in /inf mode. If you plan to use this file, be sure to place it in the directory of the distribution directory containing the files that need to be converted.

The syntax for $$Rename.txt is as follows

     [section_name_1] 
     short_name_1 = "long_name_1" 
     short_name_2 = "long_name_2" 
     short_name_x = "long_name_x" 
     [section_name_2]      

where:

  • section_name_n (section_name_1 and so on) is the full path, excluding drive letter, to the directory that contains the files. A section can have no name, or a backslash (\) as a name. In this case, it indicates that the section contains the name of the files or subdirectories that are in the root of the drive.

  • short_name_n (short_name_1 and so on) is the name of the file or subdirectory in this directory that are to be renamed. It must NOT be enclosed in quotation marks.

  • long_name_n (long_name_1 and so on) is the new name of the file or subdirectory. Note: This name should be inside quotation marks if it contains spaces or commas.

Sample $$Rename.txt file:

     [\Data] 
     My-Lin~1.LNK="Custom XYZ App1.lnk" 
     My-Lin~2.LNK="Custom XYZ App2.lnk" 
     TEMPLA~1="Templates" 
     [\DATASTORAGE\GRAPHICS] 
     GRAPHIC~1.GIF="Graphic 1.GIF" 
     GRAPHIC~2.GIF="Graphic 2.GIF" 
     GRAPHIC~2.GIF="Graphic 3.GIF" 

Using Disk Duplication to Distribute Windows NT

The following methods are the only methods currently supported by Microsoft for distributing Windows NT by means of disk duplication.

  • Use the Sysprep utility. For more information on obtaining the Sysprep utility, see Microsoft Knowledge Base article 195446, "How Customers Can Obtain System Preparation Tool for WinNT 4.0."

  • Use a disk duplication program or device for clean or new installation environments. This method can save time and effort in your production line. To use this method, you must acquire third-party equipment or software for duplicating hard disks. Note: This method of duplication is pre-GUI mode and still requires the same configuration of Unattend/Sysdiff. For information about duplicating a fully installed Windows NT installation, refer to Microsoft Knowledge Base article 162001, "Do Not Disk Duplicate Installed Versions of Windows NT."

To Pre-Install to Multiple Intel and Intel-Compatible Computers

  1. Follow all of the steps necessary to automate installing Windows NT, including building your setup script, creating packages for applications that you want to pre-install, and customizing Windows NT. Test and verify your process. These steps are identical to those used in the other methods of distributing Windows NT source files.

  2. Run Windows NT Setup on one computer but stop Windows NT Setup when it restarts the second time, after the text mode portion of Setup and before the GUI mode portion of Setup.

  3. Remove and duplicate the hard disk of that computer.

  4. Install the duplicate hard disk drive in another computer.

  5. Optionally, follow the steps in the "Modify the Machine-Specific Settings After the Character Mode Portion of Windows NT 4.0 Setup" section of Chapter 3, "Configuring Machine-Specific Information," in the Windows NT Deployment Guide: Automating Windows NT Setup.

  6. Start the second computer. At this point, the GUI mode portion of setup will begin.

To Pre-Install to Multiple RISC-based Computers

  1. Install Windows NT on one of the computer's hard disks and then use that disk to pre-install on a second disk drive.

  2. Remove the second disk drive from the computer and duplicate it.

  3. After a duplicate hard disk has been installed in a target computer, the computer is ready to complete Windows NT setup.

Note: Microsoft supports duplication of disks if they are duplicated after the GUI mode portion of Windows NT 4.0 Setup, but only when done so in conjunction with the use of the Microsoft Sysprep utility. Using another method may compromise the integrity of your systems.

Installation Performance Considerations

Optimizing Client Connectivity Software

The 16-bit Windows NT Setup program, Winnt.exe, is subject to the same conventional memory limitations as any other 16-bit MS-DOS application. Memory management and disk caching are important to ensure the best performance during the text mode phase of Windows NT Setup.

If possible, use the Microsoft NetBEUI protocol for network connectivity. The NetBEUI protocol is small and very fast. Although the NetBEUI protocol is very fast for unattended installation, it is a non-routable protocol. When using NetBEUI, you need to ensure that access to the distribution point does not require crossing a network router. If you want to use NetBEUI on a segmented network, the deployment image can be copied to a local share point on each segment. The distribution server can be any computer that provides networking support. For example, if you want, a portable computer with Microsoft Windows 95 can be used as a portable distribution server.

If you are using Microsoft Client 3.0, ensure that the Change Redirector option is set to Use the Basic Redirector. The basic redirector provides all standard workgroup functions. It also uses less memory and disk space than the full redirector uses.

Optimizing the Character Mode Setup Phase

Using Himem.sys and Emm386.exe to maximize the available memory, and using Smartdrv.exe to manage disk caching, can have a significant impact on the time necessary to complete the first phase of setup. In some cases, it can cut the time for completion by more than 60 percent. Refer to the MS-DOS user's guide for additional information.

Decreasing the Number of Files Copied During Setup

You can eliminate up to 25 MB of file transfer during the initial text mode phase of setup by removing unneeded components.

Removing Peer Web Services

Note: This does not apply to Microsoft Windows NT Server 4.0. The Dosnet.inf file controls what optional directories are copied during the text mode phase of Setup. To prevent Setup from copying the Inetsrv directory, edit Dosnet.inf with a text editor, locate Inetsrv under the [OptionalSrcDirs] section, and place a semicolon (;) at the beginning of the line. For example:

     [OptionalSrcDirs] 
     ; inetsrv 
     drvlib.nic 

Removing Third-Party Provided Network Adapter Drivers

During the installation of Windows NT 4.0, the Drvlib.nic optional source directory is copied, by default, during the initial text mode phase of setup.

Commenting out Drvlib.nic can save up to 20 MB of file transfers. To stop the copy of the Drvlib.nic directory, edit Dosnet.inf with a text editor, locate Drvlib.nic under the [OptionalSrcDirs] section, and place a semicolon (;) at the beginning of the line. For example:

     [OptionalSrcDirs] 
     inetsrv 
     ; drvlib.nic 

Special consideration must be given before commenting out Drvlib.nic with a semicolon. If the network adapters being used require files from Drvlib.nic, do not comment out the line; instead, remove all directories that are not needed. This option will still provide an increase in performance.

Chapter 2 Sysdiff.exe

An Overview of the System Difference Tool (Sysdiff.exe)

Sysdiff is a Microsoft tool that creates a system difference package, applies a system difference package to a Windows NT installation, and, additionally, can generate Windows NT installation information files (INFs) and $OEM$ distribution share points.

You first run Sysdiff /snap to take a snapshot of a system just prior to making changes to it (such as installing applications). After changes are completed, you run Sysdiff /diff to obtain the difference between the new system state and the earlier snapshot. The output is a Sysdiff package file, which is a type of "image" that contains a description of .ini file changes, registry changes, and file changes that, when applied to a similar Windows NT installation, will duplicate the changes made (such as by an application installation) to the system. This image even includes changes to individual file data; thus, the resulting Sysdiff packages can be quite large. The Sysdiff package file can be applied by using Sysdiff /apply, provided the package file is available and the correct command line is specified. However, when applying a package, Sysdiff must copy each file from the package to its final location on the hard disk, meaning that, for large applications, creating and applying Sysdiff packages may take a considerable amount of time.

To facilitate ease of installation, Sysdiff can generate an INF and an $OEM$ directory structure from a package by running Sysdiff /inf. The resulting INF contains registry and .ini file entries, and can be applied during the GUI mode of Windows NT Setup by using Cmdlines.txt or an external command. The $OEM$ directory structure is used during a Windows NT unattended setup for customization of the installation being made to the target system. This $OEM$ and INF structure offers the system administrator or OEM the flexibility to manipulate the changes to be applied, because the $OEM$ directory tree and INFs are editable text files.

In addition, Sysdiff generates the $OEM$ directory tree structure in 8.3 format for compatibility with text mode pre-installation environments and methods. Special text files ($$Rename.txt) are placed in the tree to instruct later phases of Windows NT Setup on how to restore long file names where necessary.

Possible Sysdiff.exe Command Parameters

The correct form of a sysdiff command line is as follows.

     SYSDIFF.EXE [/snap | /diff | /apply | /dump | /inf]  
    [/log:log_file] 
    [switches] 

Of /snap, /diff, /apply, /dump, or /inf parameters, one must be specified. This parameter is the Sysdiff mode and instructs Sysdiff in how to proceed. See below for descriptions of these modes and the options they use.

log_file is the optional name of a log file to which Sysdiff writes information describing its actions. The log file is not used in /apply or /dump modes.

Switches provide additional control over various operations. Some are general to all modes and others are per-mode and are documented in the mode sections that follow. The following switches are common to all modes:

/u

Generate Unicode text files

When Sysdiff runs in /snap or /diff mode, it looks for a file called Sysdiff.inf. A sample of Sysdiff.inf is included in this section. This file contains information that is used to exclude certain files, registry keys, and so on, from Sysdiff scanning.

Snap Mode

Run sysdiff in /snap mode to create the base for a later Sysdiff. The syntax for using Sysdiff in /snap mode is:

     sysdiff /snap [/log:log_file] [/p] snapshot_file  

/p

Note: Regular exclude logic still applies to files as well, so drives, directories, or files specified for exclusion in Sysdiff.inf will be excluded even if they are in the current or common user profiles. The registry portion of the snapshot is unaffected by this flag and operates normally.

snapshot_file may be any valid Win32 file name. A snapshot of the system will be recorded in this file.

Diff Mode

Run Sysdiff in /diff mode to generate a list of differences between an earlier snapshot of the system and the system as it exists at a given point in time, such as immediately after applications have been installed. The syntax for using Sysdiff in /diff mode is:

     sysdiff /diff [/log:log_file] [/c:comment] [/p] 
     snapshot_file sysdiff_file 

comment is optional and specifies a human-readable comment to be inserted in the Sysdiff package file. This comment is then used during /apply mode to tell the user what is being applied. Be sure to use quotation marks when appropriate; for example, /c:"This is a package title" requires quotation marks as shown.

/p

Note: Regular exclude logic still applies to files as well, so drives, directories, or files specified for exclusion in Sysdiff.inf will be excluded even if they are in the current or common user profiles. The registry portion of the snapshot is unaffected by this flag and operates normally. The /p flag is useful in scenarios where application files are correctly placed on the disk by the application's own installation program, but links, shortcuts, registry settings, and so on, need to be tracked, propagated, and so on.

snapshot_file specifies a file generated by an earlier invocation of sysdiff /snap on the same Windows NT installation. (Sysdiff will fail if snapshot_file is from a different Windows NT installation.)

sysdiff_file may be any valid Win32 file name. The specified file will be the output of Sysdiff and will be suitable for application to a Windows NT installation during the end-user setup by using sysdiff /applysysdiff_file.

Apply Mode

The syntax for using Sysdiff in /apply mode is:

     sysdiff /apply /m sysdiff_file  

sysdiff_file specifies a file generated by an earlier invocation of sysdiff /diff. The %SystemRoot% must be the same as it was on the system that was used to generate sysdiff_file. In other words, if you generate a Sysdiff on a Windows NT installation in C:\Winnt, that Sysdiff can be applied on other computers only if they are running Windows NT installed in C:\Winnt.

/m

When Sysdiff generates a package during /diff mode, it records the directory that is the root of the per-user profile structure within %WinDir% (this is the value of the %UserProfile% environment variable). Specifying the /m flag remaps file changes that are within this per-user profile structure into the default user. This mapping is useful because a Sysdiff package is generated when some user is logged on and, thus, .lnk files (and so on) wind up in a directory that is not yet created when GUI mode setup is running. For example, when you log on as Administrator and install applications, such files end up in %WinDir%\Profiles\Administrator. During Setup in a pre-installation scenario, these .lnk files should be placed in Default User instead of Administrator, so all users get them when they first log on.

Dump Mode

This mode is useful as a diagnostic tool. It outputs a human-readable form of the contents of a Sysdiff package to a text file. The syntax for using Sysdiff in /dump mode is:

     sysdiff /dump sysdiff_file dump_file 

sysdiff_file is a Win32 path to a file that was created by Sysdiff's /diff mode.

dump_file is a Win32 path to a text file that will be created and will contain the dump file.

Inf Mode

The /inf mode is used to generate an INF to perform .ini file and registry changes contained in a Sysdiff package, and to generate an $OEM$ directory tree for file changes contained in a Sysdiff package. When you develop an unattended deployment using the Sysdiff /inf mode, bear in mind that %SystemRoot% must be the same as it was on the system that was used to generate sysdiff_file. In other words, if you generate a Sysdiff on a Windows NT installation in C:\Winnt, that copy of Sysdiff should be applied to other computers only if they are running Windows NT installed in C:\Winnt.

The directory tree is created using only 8.3 file names; special files are placed throughout the tree, containing mappings from 8.3 names to long file names where necessary (these files are used during later phases of Setup). When running in /inf mode, Sysdiff will also add the appropriate command line to Cmdlines.txt to ensure that the changes are applied during Windows NT Setup. The syntax for using Sysdiff in /inf mode is:

     sysdiff /inf [/m] sysdiff_file oem_root 

/m

This flag is the same as it is for /apply mode. Use of this flag is mandatory failure to use it may result in the final installation (on the end user's computer) not working properly.

sysdiff_file is a Win32 path to a file that was created by Sysdiff's /diff mode.

oem_root is the Win32 path of a directory. The $OEM$ structure will be created or updated in this directory, and the INF will be placed in the $OEM$ directory with a name based on the name of sysdiff_file. A Cmdlines.txt file will also be generated or appended to. (This file will always be ANSI, regardless of whether /u was specified.)

Sample Sysdiff.inf

[Version] 
Signature = "$Windows NT$" 
[ExcludeDrives] 
; 
; The first character on each line is the drive letter 
; of a drive to exclude. 
; 
;c 
;d 
; 
; General notes for file/dir exclusion sections: 
; 
; *: refers to all drives. 
; ?: refers to the drive with the system on it. 
; :: is substituted with %systemroot% 
; 
; Lines that are not in valid format (such as those that 
; don't start with x:\) are ignored. 
; 
[ExcludeDirectoryTrees] 
; 
; Each line is a fully-qualified path of a tree to 
; be excluded. The directory and all of its subtrees 
; are excluded. 
; 
*:\recycled 
*:\recycler 
[ExcludeSingleDirectories] 
; 
; Each line is a fully-qualified path of a directory to be 
; excluded. The directory's subdirs are NOT excluded. 
; 
::\system32\config 
::\system32\logfiles 
[ExcludeFiles] 
; 
; Each line is a fully-qualified path of a file to be  
; excluded. If it does not start with x:\ then we assume it's 
; a file name part for a file to be excluded wherever it is  
; found. 
; 
*:\pagefile.sys 
ntuser.dat 
ntuser.dat.log 
[IncludeFilesInDir] 
; 
; Each line in here is a fully qualified path of a directory 
; whose files are all to be included in a diff (marked as 
; added/changed). Use this if you want to include files in  
; the diff that might not have actually been changed. 
; 
[ExcludeRegistryKeys] 
; 
; Each line indicates a single registry key to be excluded. 
; Subkeys of this key are not excluded. 
; 
; The first field is one of HKLM or HKCU 
; The second field is the subkey, which must NOT start with a 
; \. 
; 
HKLM,System\Disk 
HKLM,System\Select 
HKLM,System\Setup 
HKCU,Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU 
[ExcludeRegistryTrees] 
; 
; Each line indicates a registry key and subkeys to be  
; excluded. 
; 
; The first field is one of HKLM or HKCU 
; The second field is the subkey, which must NOT start with a  
; \. 
; 
HKLM,SYSTEM\ControlSet001 
HKLM,SYSTEM\ControlSet002 
HKLM,SYSTEM\ControlSet003 
HKLM,SYSTEM\ControlSet004 
HKLM,SYSTEM\ControlSet005 
HKLM,SYSTEM\ControlSet006 
HKLM,SYSTEM\ControlSet007 
HKLM,SYSTEM\ControlSet008 
HKLM,SYSTEM\ControlSet009 
HKLM,SYSTEM\CurrentControlSet\Enum 
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\perflib" 
[ExcludeRegistryValues] 
; 
; Each line indicates a registry value entry to be excluded. 
; 
; The first field is one of HKLM or HKCU. 
; The second field is the subkey, which must NOT start with  
; \. 
; The third field is the value entry name. 

Tip Microsoft Knowledge Base article 165533, "General Sysdiff Troubleshooting Tips," serves as an excellent added resource for the procedures to follow.

Chapter 3 Advanced Sysdiff Deployment

Implementing the Advanced Sysdiff Deployment Procedures

Step 1 Prepare the Needed Tools

Gather the tools you need to install Windows NT and implement the Advanced Sysdiff procedures. You will require:

  • Windows NT media or access to an installation share of the base Windows NT files.

  • Sysdiff.exe and Sysdiff.inf from Service Pack 3 or later.

  • Physical devices, and their associated installation media, that you want to install using the Advanced Sysdiff procedures. Note: AGP video devices require specific steps outlined in Microsoft Knowledge Base article 178275, "Unattended Installation Using AGP Video Cards," to be fully installed.

Tip This procedure should not be performed in an attempt to install components requiring the binding process because, at the time the Advanced Sysdiff steps occur in the deployment process, the bindings are fully completed and intact. Attempts to alter the bindings of your computer may have nonrecoverable consequences.

Step 2 Build the Windows NT "Base" Installation (Unattend.txt)

Create a base Windows NT installation. This installation should install the base, or default, components of a Windows NT installation. You can perform this installation by using the Unattend.txt example that is included with Windows NT, by using the Windows NT Setup Manager to generate your own answer file, or by performing a manual installation.

Step 3 Prepare for Use of System Difference Tool (Sysdiff.exe and Sysdiff.inf) to Perform the Advanced Sysdiff Procedures

Tip This installation should have a Windows NT installation directory %SystemRoot% with the same name as that to be used in the final build of your Windows NT deployment.

If you have downloaded the Sysdiffi.exe file from the ftp server, expand these files into a temporary folder (for example c:\Diff), on the base installation computer. Sysdiffi.exe is the compressed Intel Sysdiff tool. Within this temporary folder, you will find Sysdiff.exe, Sysdiff.inf, and Sysdiff.doc. Open the Sysdiff.inf file with a text editor and locate the [ExcludeDirectoryTrees] and [ExcludeRegistryKeys] section headers; these headers will appear as listed below in the BEFORE example.

BEFORE: Editing Sysdiff.inf

[ExcludeDirectoryTrees] 
; 
; Each line is a fully-qualified path of a tree to 
; be excluded. The directory and all of its subtrees 
; are excluded. 
; 
*:\recycled 
*:\recycler 
[ExcludeRegistryTrees] 
; 
; Each line indicates a registry key and subkeys to be excluded. 
; 
; The first field is one of HKLM or HKCU 
; The second field is the subkey, which must NOT start with a \. 
; 
HKLM,SYSTEM\ControlSet001 
HKLM,SYSTEM\ControlSet002 
HKLM,SYSTEM\ControlSet003 
HKLM,SYSTEM\ControlSet004 
HKLM,SYSTEM\ControlSet005 
HKLM,SYSTEM\ControlSet006 
HKLM,SYSTEM\ControlSet007 
HKLM,SYSTEM\ControlSet008 
HKLM,SYSTEM\ControlSet009 
HKLM,SYSTEM\CurrentControlSet\Enum 
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\perflib" 

As stated in the .inf file, this section of the .inf file controls which directory trees, registry keys, and subkeys should be excluded from the Sysdiff query.

The lines shown below in bold type list the changes that should be made to the Sysdiff.inf file prior to continuing with the Advanced Sysdiff procedures.

AFTER: Editing Sysdiff.inf

[ExcludeDirectoryTrees] 
; 
; Each line is a fully-qualified path of a tree to 
; be excluded. The directory and all of its subtrees 
; are excluded. 
; 
*:\recycled 
*:\recycler 
c:\DIFF          ;Sysdiff file folder 
[ExcludeRegistryTrees] 
; 
; Each line indicates a registry key and subkeys to be excluded. 
; 
; The first field is one of HKLM or HKCU 
; The second field is the subkey, which must NOT start with a \. 
; 
;Using Advanced Sysdiff, we do not want to exclude 
;ControlSet001. We want to exclude CurrentControlSet instead. 
;HKLM,SYSTEM\ControlSet001 
HKLM,SYSTEM\CurrentControlSet 
HKLM,SYSTEM\ControlSet002 
HKLM,SYSTEM\ControlSet003 
HKLM,SYSTEM\ControlSet004 
HKLM,SYSTEM\ControlSet005 
HKLM,SYSTEM\ControlSet006 
HKLM,SYSTEM\ControlSet007 
HKLM,SYSTEM\ControlSet008 
HKLM,SYSTEM\ControlSet009 
HKLM,SYSTEM\CurrentControlSet\Enum 
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\perflib" 

The above steps effectively exclude the CurrentControlSet registry key and, more importantly, the CurrentControlSet\Enum\Root subkeys from being parsed or written to during the Advanced Sysdiff procedures. Because the creation of entries into these key and subkeys could have a negative effect on the security of the registry and immediate stability of a Windows NT installation, all entries performed during the Advanced Sysdiff procedures should be performed on ControlSet001 (or whichever key is listed as the default) in the following registry key:

HKEY_LOCAL_MACHINE \SYSTEM \Select, Default

An entry of 0x00000001 in Regedit.exe or 0x1 in Regedt32.exe designates that ControlSet001 will become CurrentControlSet the next time the system restarts, and this setting is the normal default.

Warning: Making incorrect changes to the Windows NT registry can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from these changes can be solved. Use Sysdiff to make registry changes at your own risk.

Additionally, the entries added to the Sysdiff.inf file will exclude the folder that contains the Sysdiff files and the image files to be created.

After the Sysdiff.inf file has been modified and saved, an initial image of the base installation should be produced. From inside the temporary folder that contains the Sysdiff files, use the following syntax at a command line:

     sysdiff /snap snap.img 

After the snap image of the base installation has been produced, you should proceed to install the first device that you want to incorporate into your unattended deployment. Because Windows NT 4.0 is not a Plug and Play operating system, most components will be manually added to the base installation.

At this time, you should produce a system difference image. While inside the temporary folder that contains the Sysdiff files, use the following syntax at a command prompt:

     sysdiff /diff snap.img diff.img 

When the system difference image completes, you need to do two things to prepare for the Advanced Sysdiff procedures:

  1. Produce another Snap.img of the computer in its current state, thus providing a new base image in preparation for the installation of an additional device and a subsequent difference file generation. This will also maintain a modular Advanced Sysdiff structure, which will be advantageous in future installations because you may not want to apply all changes made to all computers; with modular Sysdiff packages, you can just apply the specific packages you want for different computers.

  2. Start the creation of a Diff.inf file, a Cmdlines.txt file, and the $OEM$ directory structure containing the folders and files produced, by using the System Difference tool, Sysdiff.exe, using the following syntax

     sysdiff /inf /m diff.img x:\ foldername  
    
where *foldername* is the name of the folder that will contain the $OEM$ and associated files.

Recap of the Advanced Sysdiff Steps

To recap the steps outlined above, the following have occurred:

  • Installation of a base Windows NT installation

  • Extraction of the system difference tools into a temporary folder

  • Editing of Sysdiff.inf

  • Performance of a sysdiff /snap

  • Installation of the selected device

  • Performance of a sysdiff /diff

  • Performance of an additional sysdiff /snap using a different image name

  • Performance of a sysdiff /inf to build the $OEM$ folder and associated files

Step 4 Advanced Sysdiff Procedures

Tip The Windows NT installation used to generate your Advanced Sysdiff .inf file should have a Windows NT installation directory %SystemRoot% with the same name as that to be used in the final build of your Windows NT deployment. This same name will prevent any potential problems with the [UpdateInis] section of the .inf file having a different %SystemRoot% than the client.

You are now ready to begin the steps toward building the proper folders and files necessary to perform the Advanced Sysdiff procedures. Depending on the device installed, the directories containing the most significant updates will usually be the $$\System32 and $$\System32\Drivers directories. Most files installed by the addition of a new device will be placed into these folders. Additionally, immediately under the $OEM$ directory, you will find the two Cmdlines.txt and Your_difference_image_name.inf files.

For the purposes of this paper, the following examples assume that the device to be installed by using this procedure is an ATI Technologies 3D Rage Pro AGP graphics adapter. Prior to an unattended deployment of AGP devices, certain file adjustments must be made within the i386 folder on the installation share point. These steps are detailed in Microsoft Knowledge Base article 178275, "Unattended Installation Using AGP Video Cards."

Note: Command-line examples in this paper are wrapped for clarity and, in your final installation, should be continuous.

The directory tree under the c:\Diff folder will look very similar in structure to the following screen captures and directory listings. The number of folders and files under the $OEM$ folder will vary depending on the number of files and folders in the difference capture.

Screen Shots and Directory Listings of the Advanced Sysdiff Directory Tree

Cc749954.advsys1(en-us,TechNet.10).gif

Cc749954.advsys2(en-us,TechNet.10).gif

Cc749954.advsys3(en-us,TechNet.10).gif

Tip Files with a .pnf extension (precompiled setup information file) are created as part of this device's installation. Windows NT 4.0 creates .pnf files when running the .inf files. These files exist to facilitate future instances of this .inf file being installed.

Cc749954.advsys4(en-us,TechNet.10).gif

Cc749954.advsys5(en-us,TechNet.10).gif

Cc749954.advsys6(en-us,TechNet.10).gif

Volume in drive C has no label.

Volume Serial Number is xxxx-xxxx

Directory of C:\diff

11/12/98 03:20p <DIR> .

11/12/98 03:20p <DIR> ..
09/16/97 07:53a 59,045 SYSDIFFI.EXE
08/01/97 02:57p 2,734 113583.TXT
08/01/97 02:58p 3,010 151908.TXT
08/01/97 03:00p 2,719 154487.TXT
08/01/97 03:02p 2,749 154745.TXT
08/01/97 03:04p 2,516 154888.TXT
08/01/97 03:05p 2,628 154987.TXT
07/31/97 03:03p 2,799 158548.TXT
07/31/97 03:33p 2,963 159839.TXT
07/31/97 03:12p 700 README.TXT
07/18/97 02:53p 62,224 SYSDIFF.EXE
11/12/98 05:00p 2,541 Sysdiff.inf
11/12/98 05:10p 1,090,980 snap.img
11/12/98 05:16p 361,925 diff.img
11/12/98 05:16p <DIR> $OEM$
17 File(s) 1,599,533 bytes

Directory of C:\diff\$OEM$

11/12/98 05:16p <DIR> .

11/12/98 05:16p <DIR> ..
11/12/98 05:16p 9,601 diff.INF
11/12/98 05:16p <DIR> $$
11/12/98 05:16p 82 CMDLINES.TXT
5 File(s) 9,683 bytes

Directory of C:\diff\$OEM$\$$

11/12/98 05:16p <DIR> .

11/12/98 05:16p <DIR> ..
11/12/98 05:16p <DIR> inf
11/12/98 05:16p <DIR> system32
4 File(s) 0 bytes

Directory of C:\diff\$OEM$\$$\inf

11/12/98 05:16p <DIR> .

11/12/98 05:16p <DIR> ..
11/12/98 05:10p 81,408 display.PNF
11/12/98 05:10p 21,756 dispoem.PNF
4 File(s) 103,164 bytes

Directory of C:\diff\$OEM$\$$\system32

11/12/98 05:16p <DIR> .

11/12/98 05:16p <DIR> ..
07/17/97 01:01p 143,584 ati.dll
07/17/97 01:01p 198,912 atimcd.dll
05/19/97 07:29p 31,744 ssdpms.scr
08/30/94 07:11p 9,896 ssgpcdef.hlp
12/04/96 02:02p 19,456 ssgpcdef.rsc
11/12/98 05:16p <DIR> drivers
8 File(s) 403,592 bytes

Directory of C:\diff\$OEM$\$$\system32\drivers

11/12/98 05:16p <DIR> .

11/12/98 05:16p <DIR> ..
07/09/97 04:50p 90,720 ati.sys
3 File(s) 90,720 bytes

Total Files Listed:

41 File(s) 2,206,692 bytes
830,259,200 bytes free

Rename the Advanced Sysdiff $OEM$ folder

The next step in the Advanced Sysdiff procedure is to rename the $OEM$ folder to a unique name. For this example, use the name Ati-AGP. After you rename the folder, the folder should be copied under the i386 distribution share point that will be used for the Advanced Sysdiff portion of the unattended installation.

Cc749954.advsys7(en-us,TechNet.10).gif

In the Ati-AGP folder, the Cmdlines.txt file should be opened with a text editor and changes made as outlined in the following BEFORE and AFTER examples, and in the subsequent paragraphs.

BEFORE: Editing Cmdlines.txt

[Commands] 
"rundll32 setupapi,InstallHinfSection DefaultInstall 128 .\diff.INF" 

AFTER: Editing Cmdlines.txt

; executes a rundll32 to install the diff.inf created with Sysdiff 
start /wait rundll32 setupapi,InstallHinfSection DefaultInstall 128 %systemroot%\Ati-AGP\diff.INF 
;multiple copy commands to place the files in the proper final destination 
xcopy %systemroot%\ati-agp\$$\system32\*.*  %systemroot%\system32\*.* 
xcopy %systemroot%\ati-agp\$$\inf\*.*  %systemroot%\inf\*.* 
xcopy %systemroot%\ati-agp\$$\system32\drivers\*.*  %systemroot%\system32\drivers\*.* 

Note: The /s /e xcopy command parameter can be used to reduce the need for multiple xcopy command lines.

After all the editing is completed, the Cmdlines.txt file should be saved as a .bat or .cmd file, again using a unique name. For this example, the file will be saved as Video.cmd.

Deploying Advanced Sysdiff: Command Parameter Examples, Screen Shots, and Directory Listings

The AFTER example reflects that the [Commands] header and the open and close quotation marks ("") have been removed from the rundll32 command statement, as well as the addition of xcopy command to move the necessary AGP files to their final required locations.

Further, the path to the Diff.inf file in the newly created Video.cmd file has been changed to %SystemRoot%\Ati-AGP\diff.inf. This path will be completed by using a seldom-used Winnt.exe and Winnt32.exe command-line parameter, **/r:**directory_name.

/r:

Specifies an optional directory to be installed under the %SystemRoot% directory (multiple **/r:**directory_name options may be specified. The **/r:**directory_name must exist under the i386 distribution share point directory. This directory may be referenced during certain sections of an unattended installation using the following path statement: %SystemRoot%\directory_name \. This directory remains under %SystemRoot% after the completion of Windows NT Setup.

One example of a command-line parameter used to start an unattended setup using the Advanced Sysdiff directory structure created above would be:

     winnt.exe /u:unattend.txt /s:d:\i386 /r:ati-agp 
     /e:%systemroot%\Ati-AGP\go.cmd 

The Go.cmd file mentioned in the example above resides in the Ati-AGP folder, now located under the i386 share point, and the syntax of this file would be as follows:

     call  %systemroot%\Ati-AGP\video.cmd 
     ; calls the batch to launch the Diff.inf file and "pauses" 
     ; the Windows NT installation until completion of the  
     ; Video.cmd routine. 

This Go.cmd file will run as an external command occurring at the end of GUI mode setup, as seen above in the Winnt.exe command-line example.

A more streamlined alternative to the directory and file structure outlined above is listed below. This alternate structure works equally well and is well suited to Advanced Sysdiff application of devices that do not have a large number of files to be placed into the %WinDir% directory tree. The following screen shots and directory lists show this alternative layout.

Cc749954.advsys8(en-us,TechNet.10).gif

Cc749954.advsys9(en-us,TechNet.10).gif

Volume in drive C has no label.

Volume Serial Number is xxxx-xxxx

Directory of c:\i386\Ati-agp

11/16/98 09:52p <DIR> .

11/16/98 09:52p <DIR> ..
07/17/97 01:01p 143,584 ATI.DLL
07/09/97 04:50p 90,720 ATI.SYS
07/17/97 01:01p 198,912 ATIMCD.DLL
06/24/98 06:23a 11,190 diff.inf
06/23/98 11:26a 81,320 display.PNF
06/23/98 11:26a 21,732 dispoem.PNF
06/24/98 12:25p 78 go.cmd
05/19/97 07:29p 31,744 SSDPMS.SCR
08/30/94 07:11p 9,896 SSGPCDEF.HLP
12/04/96 02:02p 19,456 SSGPCDEF.RSC
06/24/98 12:25p 365 video.cmd
13 File(s) 608,997 bytes
272,520,192 bytes free

Using the preceding directory structure would also necessitate the following adjustments to the command lines in the Video.cmd file. The Go.cmd file is unchanged under either scenario.

start /wait rundll32 setupapi,InstallHinfSection DefaultInstall 128 %systemroot%\Ati- 
AGP\diff.INF 
copy %systemroot%\ati-agp\*.dll %systemroot%\system32\ 
copy %systemroot%\ati-agp\ssdpms.scr %systemroot%\system32\ssdpms.scr 
copy %systemroot%\ati-agp\ssgpcdef.hlp %systemroot%\system32\ssgpcdef.hlp 
copy %systemroot%\ati-agp\ssgpcdef.rsc %systemroot%\system32\ssgpcdef.rsc 
copy %systemroot%\ati-agp\*.pnf %systemroot%\inf\ 
copy %systemroot%\ati-agp\ati.sys %systemroot%\system32\drivers\ati.sys 

Chapter 4 Advanced Sysdiff Alternatives

Multiple Advanced Sysdiff folders placed under your distribution share point can be used to address multiple installations of various devices by simply adding another device and repeating the steps previously outlined. Numerous "device" directories can be placed under your distribution share point and, as needed for each computer, batch files can select the proper Advanced Sysdiff folders to be used. For instance, multiple folders for a number of video adapters may be placed under the distribution folder, and then you control the installation as needed.

Up to this point, this paper has concentrated on the Winnt.exe command parameters /r: and /e: as the vehicles for implementing the Advanced Sysdiff procedures. These two parameters are not the exclusive means of implementation for these procedures. In addition to the /r: parameter, the /rx: parameter may be used either in conjunction with /r: parameters, or exclusively. The /rx: parameter accomplishes the following:

/rx:

Specifies an optional directory to be copied under the local installation source ($win_nt$.~ls) and distribution share point name directory tree during installation. This directory may be referenced during certain sections of an unattended install using the following path statement: drive_letter:\$win_nt$.~ls\distribution_share_point_name; typically i386\directory_name\. These directories, along with the Windows NT local source files, are removed at the completion of Windows NT Setup.

It is not a requirement that one or the other parameter be specified, and you may find it beneficial to use both parameters during your deployment. This will facilitate the ability, for instance, to leave the video adapter install files on the client computer using /r:, but only have the sound device and/or service pack files be removed from the client at the end of the installation process.

The Cmdlines.txt file may be edited to start either all or part of the Advanced Sysdiff procedure as well. It is not required that all the Advanced Sysdiff commands be started from either /e: or Cmdlines.txt, because a combination of both is acceptable.

Alternative Advanced Sysdiff Command-Line Examples

The following are examples of the various .cmd files, Cmdlines.txt, and Winnt.exe command-line syntax that may be used to install Windows NT using the Advanced Sysdiff procedures. Examples are wrapped for this document, but should be continuous in your environment.

; The line below would launch the unattended install placing 
; Service Pack4 and the ATI files in the temporary folders under 
; the local source\distribution directory tree. 
c:\i386\winnt.exe /u:c:\unattend1.txt /s:d:\i386 /t:d: /rx:40sp4 /rx:ati- 
agp /e:d:\$win_nt$.~ls\i386\ati-agp\go.cmd 
; The line below is the go.cmd referenced above as the external 
; command which will install Service Pack 4 and the launch the 
; video.cmd. 
start /wait d:\$win_nt$.~ls\i386\40sp4\sp4i386.exe /u /z 
call d:\$win_nt$.~ls\i386\ati-agp\video.cmd 
; The line below is the video.cmd file to launch the diff.inf and 
; file copy of the Advanced Sysdiff. 
start /wait rundll32 setupapi,InstallHinfSection DefaultInstall 128 d:\$win_nt$.~ls\i386 
\ati-agp\diff.INF 
xcopy d:\$win_nt$.~ls\i386\ati-agp\$$\system32\*.* %systemroot%\system32\*.* 
xcopy d:\$win_nt$.~ls\i386\ati-agp\$$\inf\*.* %systemroot%\inf\*.* 
xcopy d:\$win_nt$.~ls\i386\ati-agp\$$\system32\drivers\*.* %systemroot%\system32\drivers\*.* 
; The file below would launch the unattended install utilizing  
; only the Cmdlines.txt file to launch the Advanced Sysdiff  
; procedures. 
c:\i386\winnt.exe /u:c:\unattend1.txt /s:d:\i386 /t:d: /rx:40sp4 /r:ati-agp 
; The following would be the Cmdlines.txt file needed to run the  
; .cmd files in the /rx: and the /r: folders. 
[Commands] 
"d:\$win_nt$.~ls\i386\40sp4\sp4.cmd" 
"d:\$win_nt$.~ls\i386\ati-agp\video.cmd" 
;The following is the syntax for the SP4.cmd file.  
start /wait d:\$win_nt$.~ls\i386\40sp4\SP4i386.exe /u /z 
; The following would be the syntax for video.cmd 
; as /r:ati-agp was used to launch the unattend with  
; %systemroot%\ati-agp is the target folder. 
start /wait rundll32 setupapi,InstallHinfSection DefaultInstall 128 %systemroot%\Ati-AGP\diff.INF 
copy %systemroot%\ati-agp\*.dll %systemroot%\system32\ 
copy %systemroot%\ati-agp\ssdpms.scr %systemroot%\system32\ssdpms.scr 
copy %systemroot%\ati-agp\ssgpcdef.hlp %systemroot%\system32\ssgpcdef.hlp 
copy %systemroot%\ati-agp\ssgpcdef.rsc %systemroot%\system32\ssgpcdef.rsc 
copy %systemroot%\ati-agp\*.pnf %systemroot%\inf\ 
copy %systemroot%\ati-agp\ati.sys %systemroot%\system32\drivers\ati.sys 
; The following would be the syntax to launch an unattended  
; install using all temporary folders. 
c:\i386\winnt.exe /u:c:\unattend1.txt /s:c:\i386 /t:d: /rx:40sp4 /rx:ati- 
agp /e:d:\$win_nt$.~ls\i386\ati-agp\go.cmd 
; The following is the go.cmd file called in the batch above. 
start /wait d:\$win_nt$.~ls\i386\40sp4\SP4i386.exe /u /z 
call d:\$win_nt$.~ls\i386\ati-agp\video.cmd 
; The line below is the video.cmd file to launch the diff.inf and  
; file copy of the Advanced Sysdiff. 
start /wait rundll32 setupapi,InstallHinfSection DefaultInstall 128 d:\$win_nt$.~ls\i386 
\ati-agp\diff.INF 
xcopy d:\$win_nt$.~ls\i386\ati-agp\$$\system32\*.*  %systemroot%\system32\*.* 
xcopy d:\$win_nt$.~ls\i386\ati-agp\$$\inf\*.*  %systemroot%\inf\*.* 
xcopy d:\$win_nt$.~ls\i386\ati-agp\$$\system32\drivers\*.*  %systemroot%\system32\drivers\*.* 
; The following somewhat more ambitious unattended launch would  
; start an unattended installation that included the application  
; of Service Pack 4, an AGP video adapter, a Crystal  
; Semiconductor sound device and Internet Explorer 4.01. 
c:\i386\winnt.exe /u:c:\unattend1.txt /s:c:\i386 /t:d: /rx:40sp4 /rx:crystal /rx:ie401 /rx:ati- 
agp /e:d:\$win_nt$.~ls\i386\ati-agp\go.cmd 
; The go.cmd file used above would have the following syntax. 
start /wait d:\$win_nt$.~ls\i386\40sp4\sp4i386.exe /u /z 
call d:\$win_nt$.~ls\i386\ati-agp\video.cmd 
call d:\$win_nt$.~ls\i386\crystal\crystal.cmd 
call d:\$win_nt$.~ls\i386\ie401\ie.cmd 

The Video.cmd, Crystal.cmd, and Ie.cmd files would appear as the following three .cmd files:

;video.cmd 
start /wait rundll32 setupapi,InstallHinfSection DefaultInstall 128 d:\$win_nt$.~ls\i386 
\ati-agp\diff.INF 
xcopy d:\$win_nt$.~ls\i386\ati-agp\$$\system32\*.*  %systemroot%\system32\*.* 
xcopy d:\$win_nt$.~ls\i386\ati-agp\$$\inf\*.*  %systemroot%\inf\*.* 
xcopy d:\$win_nt$.~ls\i386\ati-agp\$$\system32\drivers\*.*  %systemroot%\system32\drivers\*.* 
;crystal.cmd 
rundll32 setupapi,InstallHinfSection DefaultInstall 128 d:\$win_nt$.~ls\i386\crystal\crystal.inf 
copy d:\$win_nt$.~ls\i386\crystal\cs32ba11.dll %systemroot%\system32 
copy d:\$win_nt$.~ls\i386\crystal\cwaudio.bin %systemroot%\system32 
copy d:\$win_nt$.~ls\i386\crystal\midimap.cfg %systemroot%\system32 
copy d:\$win_nt$.~ls\i386\crystal\cs32ba11.sys %systemroot%\system32\drivers 
;ie.cmd 
;This line installs ie401 without active desktop 
start /wait d:\i386\ie401\ie4setup.exe /Q:A /C:"ie4wzd /S:""#e"" /Q1 /I:N /R:N" 

At this time, the /r: parameter cannot be used with certain cab files contained in the Internet Explorer 4.01 installation set. The /rx: parameter allows you to work around this issue. Simply start Setup from the temporary folder.

Should an end user start the .cmd files left in place under a folder installed by using the /r: parameter, the user will receive an "Installation Failed" pop-up dialog box and, after clicking OK, any file copy commands included in the file will proceed. This is by design; the implementation of the rundll32 setupapi,InstallHinfSection DefaultInstall 128 command statement must occur in the "system context" installation mode using the system account. Windows NT installation occurs in this "system context" and, therefore, no errors are seen during setup.

Using Advanced Sysdiff During Unattended Upgrades of Windows NT

As noted in Microsoft Knowledge Base article 186336, "Unattend.txt Options That Are Used During an Unattended Upgrade," most parameters that are typically set through an Unattend.txt answer file are ignored during the upgrade process. Using the steps outlined in Microsoft Knowledge Base article 180647, "Disabling Windows NT 3.51 Video Drivers to Enable Unattended Installation," and subsequently starting an unattended upgrade that employs the Advanced Sysdiff procedures, greatly enhances the configuration changes available during this process.

Because, during an unattended upgrade, the $OEM$ directory structure is copied to the local source folder ($win_nt$.~ls) but any Cmdlines.txt files are ignored, the Advanced Sysdiff procedures are perfectly suited to enable changes by using the /r:, /rx:, and /e: Winnt.exe command parameters. Although the option of using the Cmdlines.txt file is eliminated during an upgrade, most changes can be implemented by using the steps outlined in this section.

Pre-Deployment Testing

The steps outlined in this guide provide those whose task it is to deploy Windows NT a broader flexibility in the installation of some of the hardware capable of running in a Windows NT installation. This flexibility ranges from the ability to add a permanent installation folder on the client by use of the /r: parameter, to using a mixture of /r: and /rx: to install multiple devices, thus only leaving the desired installation in the %SystemRoot% folder. These steps allow a broader freedom of installing devices that, at this time, are not detected in the normal course of a Windows NT installation.

Although the steps listed in this guide have been tested against a number of devices, many devices exist that have not been tested and your results using these procedures may vary depending on the hardware you want to install. Extensive testing, similar to that performed prior to an unattended deployment, should be instituted prior to your final roll-out of an Advanced Sysdiff assisted deployment.

For More Information

For the latest information about Windows NT, refer to Microsoft TechNet or our World Wide Web site at https://www.microsoft.com/ntworkstation/.

To read the Windows NT Deployment Guide: Automating Windows NT Setup, check out Microsoft TechNet.