How to create script files and use them to automate the cloning of a Windows 98 installation on multiple machines.
Also see "Automating Windows Setup with BATCH.EXE in Windows 98".
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.
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:
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).
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 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
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.
INFINST.EXE takes info from a program install's .INF file and assimilates it into MSBATCH.INF or other setup script.
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.