This article describes how to create a script file and use it to automate the cloning of a Windows 98 installation on multiple machines.

Also see "Automating Windows Setup with BATCH.EXE in Windows 98".

Automating Windows Setup with Script Files

What are Setup Scripts?

Setup scripts (or installation scripts) are ASCII text files containing batches of commands and parameters which are capable of supplying a portion or even nearly all of the information required by Windows SETUP to automate the installation (or re-installation) of Windows on one or more machines.

This makes it possible to customize SETUP with pre-defined settings as well as vary the degree to which a user participates interactively with the SETUP process.

The filename for the default script used by SETUP is MSBATCH.INF.

Creating Script Files

Method 1: Create one manually with a text editor

The task of beginning one from scratch would be a daunting, but is simplified greatly by instead adapting an existing script. This entails modifying the script's commands and parameters to suit your needs, using a text editor.

Sources of scripts include:

  • Sample scripts
    Sample scripts can be found beneath the \Admin\* folder of the Windows 95 CD-ROM. I have been unable to locate sample script files on the Windows 98 CD- ROM.

  • Scripts left over from previous installs
    Any machine is likely to have a copy of the script used to install Windows on it. Use Find and search for MSBATCH.INF to find it.

When creating scripts for multiple machines, machine-specific info such as user and machine names should be removed so that when a SETUP based on the script does not find that information it will prompt the user to enter it interactively.

The SETUPLOG.TXT variation

An interesting variation on method number one is to perform an interactive installation and then combine parts of the resulting SETUPLOG.TXT with a modified sample or existing setup script.

SETUPLOG.TXT is created in the root directory of C: by every Windows installation. It is a record of each and every event which occurs during an install (much as the BOOTLOG.TXT file records every event during a logged boot).

One can think of the relationship between MSBATCH.INF and SETUPLOG.TXT as that of input to and output from SETUP.EXE.

Contrary to some sources, the two files are not the same. An MSBATCH.INF file of a couple hundred lines causes SETUP.EXE to create a SETUPLOG.TXT nearly four-thousand lines in length.

Most of those lines in SETUPLOG.TXT are completely different from those in MSBATCH.INF. However, some lines are nearly identical or similar, and some are identical. Those lines which are identical can be copied from the interactive source (SETUPLOG.TXT) to the script (MSBATCH.INF).

Method 2: Use NETSETUP or BATCH

NETSETUP.EXE and BATCH.EXE are graphical-user-interface utility programs designed to create setup scripts. On the Windows 95 CD-ROM, both programs can be found in the \Admin\Nettools\Netsetup folder. On the Windows 98 CD-ROM, BATCH.EXE is found in the \tools\reskit\batch folder. NETSETUP.EXE is no longer included on the Windows 98 CD-ROM, evidently it has been surpassed by the new version of BATCH.

Neither of these utilities can provide access to all of the SETUP commands and parameters available, and neither can modify an existing script, only create new ones. In order to have access to ALL of the available scripting commands and parameters or to modify an existing script, it is necessary to use a text editor.


  • The "Server Based Setup Default Properties" dialogue box of NETSETUP.EXE can be used to create script files. However, this gui interface is more difficult to use than that of BATCH.EXE and provides access to fewer commands and parameters when compared with BATCH.EXE.

    To try it out, go to the Windows 95 CD-ROM folder \Admin\Nettools\Netsetup and launch NETSETUP.EXE. Then click on Make Script from the Main menu. You'll be asked to give a name and path for the file to be created. After that, use the GUI to select commands and parameters for the setup script.


  • BATCH.EXE (especially the Windows 98 version) provides more complete access to commands and parameters than NETSETUP.EXE and the interface is much easier to use.

    To use BATCH, launch it from the Windows 95 CD-ROM \Admin\Nettools\Netsetup folder, or from the Windows 98 CD-ROM folder \tools\reskit\batch and then use its graphical user interface to specify commands and parameters for setup script options.

    The Help files for the Windows 98 version are comprehensive and, for the most part, comprehensible.

    Microsoft says BATCH.EXE has been completely re-worked in Windows 98. Some of the improvements include:
    • The Gather All feature
    • Access to more commands and parameters
    • Better error-handling
    • Installation of IE 4.0

    The Gather All feature is especially worth mentioning. Gather All collects a wide variety of information directly from a machine's Registry and uses it to automatically create an .INF file. Great way to clone a machine.

    Another difference between the 95 and 98 versions of BATCH is that the 98 version apparently allows a script to be edited. Although the documentation is somewhat ambiguous, it would appear that you can load a setup script (in MSBATCH.INF format) into BATCH.EXE by including the filename on the command line. Example:


Remember that neither NETSETUP.EXE or the Windows 95 version of BATCH.EXE can be used to edit an existing script. Use them to create scripts and then modify those script as required using a text editor.

Assimilating Installation of Another Program into SETUP

INFINST.EXE takes info from a program install's .INF file and assimilates it into MSBATCH.INF or other setup script.

Running Script Files

To run Windows SETUP with a script, use the SETUP command followed by the path and filename for the .INF script file.

When BATCH.EXE creates a setup script, it names it MSBATCH.INF by default, but in principle any valid filename is acceptable. The .INF extension is recommended.

For example, type the following at the command line:


Windows SETUP will begin the automated installation, consulting the .INF file as required. SETUP will enter interactive mode to gather from the user any required information that is missing.

Bruce Miller, 2000, 2014
Windows Articles Index

All Articles Index

  Hermit Homepage