Previous | Next

Using the New Windows 98 Tools to Customize Installations

Windows 98 includes new and improved tools that make it easier to customize and automate Windows 98 installations. The following figure compares the tools and processes used in Windows 95 versus the new ones used in Windows 98.

The new Windows 98 tools for customizing Setup provide the following enhancements.

Custom Setup improved with Microsoft Batch 98 (Batch.exe).

The new Microsoft Batch 98 (Batch.exe) provides a single, comprehensive, and easy-to-use solution for custom installation. You can customize Setup to accept the end user license agreement; to remove desktop icons and turn off the Registration Wizard; enable user profiles; add group policies; customize setup for the Internet Explorer 4 browsing software, and all the new shell and desktop options. Batch.exe now offers a more intuitive, Windows 98–like user interface and provides error checking.

Adding device drivers simplified with INF Installer (Infinst.exe).

Infinst.exe allows you to add device drivers automatically. It works on all classes of devices, eliminates the need to manually edit driver and custom INF files, and eliminates driver conflicts. You can use INF Installer in conjunction with Microsoft Batch 98 to integrate third-party network clients into your Windows 98 installation.

Using Dbset.exe to customize setup scripts and other text files.

With Dbset.exe you can easily individualize setup scripts and other types of text files. For example, you can create a template setup script with settings that you want to use for all users in your organization or workgroup. Then, you create a database file with specific data for each user, for example, user_name, computer name, and so on. From the template and database file Dbset.exe creates an individualized setup script by replacing the variable names (for example user_name) with the actual name of the user (for example, Maria). With Dbset.exe, you can also customize other types of files, such as registry files and write environment variables.

NetSetup is replaced with Microsoft Batch 98.

The Windows 95 server-based Setup (Netsetup.exe) has been eliminated to avoid Layout.inf disparity and large footprint problems. Its functionality has been replaced by Microsoft Batch 98 and a simple method for distribution share creation: drag-and-drop. With this drag-and-drop method, you simply create an installation point on a network server and copy the Windows 98 CAB files to that point. Windows 98 does not support either remote-boot (with RIPL software) or shared installations.

Using Microsoft Batch 98 (Batch.exe)

Microsoft Batch 98 (Batch.exe) is a Windows-based program that makes it easy to create setup scripts that can be used to automate Windows 98 installation. With Batch.exe, you can create unattended installations because when you install Windows 98 using a setup script, Setup consults this file instead of prompting the user for each piece of information. However, there are some circumstances when user intervention is still required.

Even though Batch.exe runs on Windows 95 and Windows NT, it is best to run it on a Windows 98 model computer to take full advantage of its configuration scanning functionality. This functionality is available through the Gather now button as explained in "Batch.exe Features" later in this chapter.

Batch.exe Features

Microsoft Batch 98 is an improved version of the Batch.exe utility available in Windows 95. Batch.exe now offers a more intuitive, Windows 98–like user interface as shown in the following figure.

Some of the new functionality and enhancements in Microsoft Batch 98 include the following.

Create a custom script based on current registry settings.

You can use Batch.exe to scan an existing Windows 98 model computer’s configuration by using Gather now (1) and create a setup script in Msbatch.inf format based on that information with Save settings to INF (7).

Accept the end-user license agreement automatically.

You can customize Setup to not display either the License Agreement or the Product Key dialog boxes and accept their terms automatically using the Install Info and Setup Prompts tabs in General Setup Options (2).

Customize computer and user information.

You can specify the user’s name, company name, computer name, workgroup, and computer description using the User Info tab in General Setup Options (2). If you are upgrading from an existing Windows installation and want to preserve current user settings, do not enter this information.

Control user input.

You can control how much input a user has while setting up Windows 98. The administrator can choose which options (if any) setup will provide for user input and which defaults to provide. Use the Install Info, Desktop, and Setup Prompts tabs in General Setup Options (2).

Disable or enable uninstall information support.

You can instruct Setup to automatically create Uninstall information, to automatically skip the Installation Directory warning, or to prompt the user with the choice to do so during setup. Use the Install Info tab in General Setup Options (2).

Allow each user to customize the computer’s configuration.

You can maintain separate desktop and Start menu settings for each user who logs on to the computer. Use the User Profiles tab in General Setup Options (2).

Automatically install local or network printers.

You can install printers, network or local, or skip the Printer Setup Wizard altogether. Use the Printers tab in General Setup Options (2).

Automatically install and customize network clients.

You can automatically install the Client for Microsoft Networks and the Client for NetWare versions 3.x and 4.x, and you can enable support for other third-party networks. You can also set options for each client, including validated logon, preferred server, default logon, and the first network drive. Use the Clients and Additional Clients tabs in Network Options (3).

Automatically install network protocols.

You can automatically install protected-mode stacks for NetBEUI, IPX/SPX, TCP/IP, and 32-bit DLC, and define settings for IPX/SPX and TCP/IP. Use the Protocols tab in Network Options (3).

Enable support for network services.

You can install file and printer sharing services for either Microsoft networks or NetWare 3.x/4.x networks using the Services tab in Network Options (3). You can also enable support for additional network services, clients, and protocols using the Additional Clients tab in Network Options (3).

Preselect optional components.

You can use Optional Components (4) to choose which Optional Components to include and exclude during Windows 98 Setup. You can edit the Optional.ini file provided with Batch.exe to control what Optional Components are presented in Batch 98. This is useful to limit the choices available and to include components not provided with Windows 98.

Customize Internet Explorer 4.0 Setup.

You can customize Setup for Internet Explorer 4.0 as well as many of the new shell and desktop options. For example, you can specify the Internet security and proxy settings using the Security and Proxy Settings tabs in Internet Explorer Options (5).

Enable or disable software and driver upgrades from the Internet.

You can enable or disable upgrading software and drivers from the Internet. You can also specify which local or remote intranet page to use for upgrading drivers and software. Use the Windows Update tab in Advanced Options (6).

Add registry files to the Windows 98 Setup installation point.

You can add registry files to the installation point from which you will install Window 98. If they are specified in your setup script, Window 98 Setup adds them automatically during the Run Once portion of Setup. Use the Additional Files tab in Advanced Options (6).

Simultaneously create setup scripts for multiple computers.

Batch.exe can save up to 9,999 separate setup scripts simultaneously. By supplying a text file listing each computer’s name (and IP address, if desired), you can save multiple setup scripts created from the same template. Use the Multiple Machine-Name Save option on the File menu (8).

Creating Custom Scripts with Batch.exe

By using Microsoft Batch 98 (Batch.exe) and completing the options, you create a custom script in Msbatch.inf format that can be used in unattended installations — running Windows 98 Setup with minimal user intervention.

Batch.exe is especially useful when you are testing alternate configurations and need to run Setup repeatedly. Batch.exe can be used to define all options in a setup script.

To create a custom script with Microsoft Batch 98

  1. Install Windows 98 on a model computer with the configuration you want to use for your setup script.
  2. Install Microsoft Batch 98 (Batch.exe) by running Setup.exe from the \Tools\Reskit\Batch directory on your Windows 98 compact disc.
  3. On the Start menu, point to Programs, and then click Microsoft Batch 98.

    The Microsoft Batch 98 screen appears.

  4. Click Gather now to retrieve the registry information from your model computer.

    Once Batch.exe gathers the registry information, the status below the Gather now button will display Complete.

  5. Use the System Settings (General Setup Options, Network Options, Optional Components, Internet Explorer Options, and Advanced Options) to customize the settings you want to use for your setup script.

    For more information on these settings, see "Understanding the Microsoft Batch 98 Options" later in this chapter.

  6. Click Save settings to INF to save your settings to a setup script.

    Batch.exe creates a setup script in Msbatch.inf format (with the default name of Msbatch.inf) based on the current registry settings it gathered from your computer. By default, Batch.exe saves the script file in the directory where Microsoft Batch 98 was installed.

After you create the setup script, you can run Windows 98 Setup by specifying the name of the script as a command-line parameter, as described in "Running Custom Setup Scripts" later in this chapter. Depending on how many options you completed in Batch Setup, you might not have to provide any additional input while installing Windows 98.

For more information on using Batch.exe, see "Understanding the Microsoft Batch 98 Options" later in this chapter. For a description of the parameters in the file created by Batch Setup, see Appendix D, "Msbatch.inf Parameters for Setup Scripts." If you want to modify the file that is created, follow the guidelines for editing setup scripts, as described in "Editing an Existing Setup Script" earlier in this chapter.

Tip for Ensuring User Logon Capabilities in Setup Scripts

By default, Windows 98 Setup preserves the network identification information from the user’s previous networking configuration, including the logon domain or preferred server. However, in cases where this information is not already defined, you must specify settings in the setup script. If you want to preserve existing settings, do not specify any network settings in the Msbatch.inf file. If users are installing Windows 98 from a server that requires logon validation, make sure the script defines the correct logon server. For a computer that will run Client for Microsoft Networks and use the Windows NT network for network logon validation, you should define values for LogonDomain= and ValidatedLogon= in the [VRedir] section. For a computer that will run Client for NetWare Networks, define a correct value for PreferredServer= in the [NWRedir] section. If the appropriate values are not defined in a setup script, the user might not have the validated access required to complete the final Setup steps for installing printers and other actions.


Understanding the Microsoft Batch 98 Options

Microsoft 98 Batch groups the system settings you can customize into five options: General Setup Options (1), Network Options (2), Optional Components (3), Internet Explorer Options (4), and Advanced Options (5) as shown in the following figure.

The following sections describe these options providing information that maps the information you enter in the Microsoft 98 Batch dialog boxes to the appropriate sections in your INF setup script. For information on the format that INF setup scripts use, see Appendix D, "Msbatch.inf Parameters for Setup Scripts."

General Setup Options

With the General Setup Options dialog box you customize many of the Windows 98 general settings, such as the installation directory, user name, and computer name. You can also use this dialog box to prevent Setup from prompting you for information, allowing you to create a fully automated (5)setup script.

The following sections describe each of the property pages in the General Options dialog box.

Install Info

In the Install Info property page, you set parameters that will be defined in the [Setup] section of your setup script. Table 3.4 maps the elements (fields, check boxes, and options) in Install Info where you enter or select information to the corresponding parameters in your setup script.

Table 3.4 Install Info elements

Property Page Element Description
Product ID
[Setup]
ProductKey="MyProductID"
Type the product key located either on the Certificate of Authenticity or on the back of (5)your Windows 98 compact disc.
Installation Directory
[Setup]
InstallDir="MyWin98Dir"
Type the directory path where Windows 98 is to be installed. If you are upgrading from Windows 95 or Windows 3.1x, the default is the current Windows installation directory. If you are creating a template script for other computers, you might have to change this default.
Do not show installation directory warning
[Setup]
NoDirWarn=1 (checkbox selected)

NoDirWarn=0 (checkbox cleared)

Select this check box to instruct Setup not to display the installation directory warning. Use this setting when upgrading from Windows 95 (5)or Windows 3.1x.

Clear this check box to instruct Setup to display the Installation Directory Warning dialog box.

Do not create uninstall information
[Setup]
Uninstall=0
Click this option to instruct Setup not to create the backup files for uninstalling Windows 98 and not to display the Uninstall Options dialog box.
Automatically create uninstall information
[Setup]
Uninstall=1
Click this option to instruct Setup to write all the backup files for uninstalling Windows 98 in the directory specified by the user during installation, through the Uninstall Options dialog box.

User Info

In the User Info property page, you can provide the information Setup needs for determining who will use the computer. Table 3.5 maps the elements in User Info that you enter or select to the corresponding parameters in your setup script.

Table 3.5 User Info elements

Property Page Element Description
User Name1
[NameAndOrg]
Name=
Type the name of the registered user of this copy of Windows 98.
Company Name1
[NameAndOrg]
Org=
Type the name of the organization that is the registered owner of this copy of Windows 98.
Computer Name1 2
[Network]
ComputerName=
Type the name you want to use to identify your computer on the network. The computer name must be unique.
Workgroup1, 2
[Network]
Workgroup=
Type the name of the workgroup that your computer belongs to.
Description1, 2
[Network]
Description=
Type the name you want to use to describe your computer to other users, for example the location of the computer or your department. On many networks, you can use a computer’s description to search for it on the network.
1 On a new installation, Setup prompts for this information if it is not provided on a script. On a Windows upgrade, Setup reads this information from the previous Windows version.

2 For more information on naming conventions, see "Computer Identification Parameters in [Network]" in Appendix D, "Msbatch.inf Parameters for Setup Scripts."


Setup Prompts

In the Setup Prompts property page, you can enter settings to eliminate many of the prompts Setup generates. The Setup Prompts settings are necessary to generate a fully automated Setup script. These settings cannot be gathered from a model computer using Gather now. Table 3.6 maps the elements in Setup Prompts that you enter or select to the corresponding parameters in your setup script.

Table 3.6 Setup Prompts elements

Property Page Element Description
Auto-accept end-user license agreement
[Setup]
ShowEula=
Check this box to prevent Setup from displaying the License Agreement.
Do not prompt for emergency startup disk
[Setup]
EBD
Check this box to prevent being prompted to create a Windows 98 Startup Disk.
Automatically reboot PCI and PnP machines during setup
[Setup]
VRC
Check this box to automatically reboot during Setup.
Do not search source folder for new devices
[Setup]
DevicePath
Clear this box to allow Setup to search for new drivers in the Windows 98 installation point if Setup detects new hardware. Clearing this box does not cause Setup to prompt you for a source folder for new drivers, however, it can slow down the installation of new hardware.
Skip the PC Card (PCMCIA) wizard Check this box to prevent Setup from displaying the PC Card (PCMCIA) Wizard dialog box when Setup detects a PC Card controller. This is necessary only when you run Setup on computers with PC Card slots.

Clear this box if real-mode PC Card drivers will be loaded after Setup restarts your computer for the first time; otherwise, Setup will fail.

Using a real-mode PC Card network boot diskette to initially gain network access and launch Setup will not cause Setup to fail with this box checked.


Regional Settings

In the Regional Settings property page, you can set the time zone, keyboard layout, and regional settings.

Desktop

In the Desktop property page, you can configure which desktop icons, such as My Documents and Internet Explorer, will be available on the desktop. When upgrading from an existing Windows installation, some icons that were already present on the desktop will be migrated to the new Windows 98 desktop. You can also prevent the Welcome to Windows 98 and the Windows Registration Wizard screens from being displayed. Table 3.7 maps the elements in Desktop that you enter or select to the corresponding parameters in your setup script.

Table 3.7 Desktop elements

Property Page Element Description
My Documents Check this box to include My Documents on the desktop.
Connect to the Internet Check this box to include Connect to the Internet on the desktop. This is a shortcut to a wizard that guides you through the steps for connecting to the Internet. If you plan to use a setup script that specifies all the necessary settings for connecting to the Internet or if you do not plan to use the Internet Explorer browsing software, you may want to clear this box. If you check the Internet Explorer & Outlook Express box, the Connect to the Internet check box will be grayed-out and the Connect to the Internet icon will not appear on the desktop.
Network Neighborhood Check this box to include Network Neighborhood on the desktop. This icon appears only if your computer is on a network. Clearing this check box prevents users from easily accessing other computers in their workgroup or adjusting their network settings through their desktop.
Internet Explorer & Outlook Express Check this box to include Internet Explorer and Outlook Express on the desktop. When you check this box, the Connect to the Internet shortcut is removed from the desktop. If you check this box, it is recommended that you specify the proxy settings in the Proxy Settings property page (Internet Explorer Options).
Recycle Bin Check this box to include Recycle Bin on the desktop.
Setup the Microsoft Network Check this box to include Set Up The Microsoft Network on the desktop.
Delete online service from desktop after setup Check this box to remove Online Services from the desktop when starting Windows 98 for the first time.
Do not show the Windows 98 welcome screen Check this box not to display the Welcome to Windows 98 screen.
Do not show the Windows registration wizard Check this box to disable the Register Now option on the Welcome to Windows 98 screen.

Printers

You can use the Printers property page, to install network or local printers. Enter the printer information exactly as you enter it in the Add Printer Wizard. After you have entered the printer name, type, and port, click Add to add that printer to the list of printers to be installed during setup. These settings are saved to the [Printers] section of your setup script. To add more printers, repeat this procedure for each printer you want to add. To install printers successfully, you must have access to them after Setup finishes its installation process. Table 3.8 maps the elements in Printers that you enter or select to the corresponding parameters in your setup script.

Table 3.8 Printers elements

Property Page Element Description
Printer Name Type a name for your printer, for example Marketing Printer.
Printer Type Enter the type of printer you want to install, for example HP LaserJet 5Si/5Si MX PS. You must enter the printer type exactly as you do in the Windows 98 Add Printer Wizard.
Printer Port Type the network path or the queue name of your printer. For example, the printer port for a local printer could be LPT1. For a network printer it could be \\Server1\print8.

MRU Locations

In the MRU Locations property page, you specify the locations—most recently used (MRU) paths—where Setup searches for drivers that will appear in the drop down menus when Setup detects new hardware. These locations can be either local or network locations specified by a UNC path. These settings are saved to the [InstallLocationsMRU] section of your setup script.

User Profiles

In the User Profiles property page, you can specify user profile settings. You can also specify if all users of a computer will use the same preferences and desktop settings or if they can customize their own preferences and settings. For more information on user profiles, see Chapter 7, "User Profiles."

Network Options

With the Network Options dialog box, you customize network settings.

If you enter any information in this dialog box, Setup removes all previous network components that are not specified here. If you do not provide any network information, Setup adds the default Windows 98 network components.

For more information on how to configure network settings, see Chapter 14, "Introduction to Networking Configuration." For information on how to specify parameters in a setup script for installing networking components, see "[Network]" in Appendix D, "Msbatch.inf Parameters for Setup Scripts."

Certain network settings are not compatible with each other and Microsoft Batch 98 prevents these options from being selected together. When you select a particular network setting, Microsoft Batch 98 automatically disables (grays-out) any incompatible settings or prompts you to choose which network setting you want to select.

Optional Components

With the Optional Components dialog box, you can customize your installation by choosing the components you want to install.

Microsoft Batch 98 uses the Optional.ini file to determine the available optional components. This is the location for specifying accessibility options.

Certain optional components depend on others to be installed to function. If a component depends on another component that has not been selected to be installed, the dependent component will be disabled (grayed out). For more information on optional component dependencies, see "[OptionalComponents]" in Appendix D, "Msbatch.inf Parameters for Setup Scripts."

For more information on which components are installed by default and the sizes of each component, see "Choosing Typical, Portable, Compact, or Custom Setup Options" in Chapter 2, "Setting Up Windows 98."

Internet Explorer Options

With the Internet Explorer Options dialog box, you can customize the browser and shell settings for Windows 98. This allows a high level of customization of the Windows 98 user interface.

The following sections describe each of the property pages in the Internet Explorer Options dialog box.

Desktop

In the Desktop property page, you can specify which Quick Launch toolbar icons will be available and if you want to enable the channel bar. Table 3.9 maps the elements in Desktop that you enter or select to the corresponding parameters in your setup script.

Table 3.9 Desktop elements

Property Page Element Description
Internet Explorer Check this box to have the Internet Explorer link available in the Quick Launch toolbar.
Outlook Express Check this box to have the Outlook Express link available in the Quick Launch toolbar. This box will be unavailable if Outlook Express is not selected in optional components.
Show Desktop Check this box to have the Show Desktop link available in the Quick Launch toolbar. This allows users to have easy access to their desktop when applications are open.
View Channels Check this box to have the View Channels link available in the Quick Launch toolbar. This allows users to launch the Channel Bar.
Channel Bar Check this box to have the channel bar present on the Desktop. This does not require active desktop to be enabled.

Display

In the Display property page, you can specify whether active desktop is enabled, whether to open each folder in the same or separate windows and the method of clicking to select and open items. If single click is selected, items will be selected and opened consistently with your settings for using the Internet Explorer browsing software.

Browser

In the Browser property page, you can specify default Web pages for Home Page, Post Setup Page and Online Support Page. The post setup page is only seen the first time Internet Explorer is used to browse.

Security

In the Security property page, you can specify levels for security for various zones of Web content. The available zones are Local Intranet, Trusted, Internet and Restricted site. First select the Zone you wish to set the security level for and then click High, Medium, or Low depending on the level of security desired. High will prevent potentially dangerous content from being download. Medium will warn when content is potentially dangerous before it is downloaded. Low will allow all content to be downloaded.

Proxy Settings

In the Proxy Settings property page, you can specify how Internet Explorer should gain access to various locations. This allows you to preconfigure Internet Explorer to have access through your proxy server(s). In the Exceptions box, you can specify to bypass using a proxy for certain addresses.

Advanced Options

With the Advanced Options dialog box you can add registry files, specify policy locations and disable or redirect Windows Update.

Additional Files

In the Additional Files dialog box, you can specify registry files to be imported and the location of a system policy file. Table 3.10 maps the elements in Additional Files that you enter or select to the corresponding parameters in your setup script.

Table 3.10 Additional Files elements

Property Page Element Description
Add Registry File Enter the name of a registry file to be merged into the registry during setup. The registry file must be manually copied to the setup share before setup is launched. The file will automatically be copied by setup to the %WinDir% directory during the Copying Files phase of Setup and merged during the Hardware Detection phase of Setup.
System Policy File You can specify the location or a policy file if it is not in the default policy location. Specify the UNC path and name of the system policy file to be used. For more information on system policies see Chapter 8, "System Policies."

Windows Update

In the Windows Update property page, you can specify if drivers and software can be upgraded across the Internet through Windows Update. You can also redirect Windows Update to a Web page other than Microsoft’s. This is useful if you would like to create your own internal Web page for disseminating drivers to multiple computers. Table 3.11 maps the elements in Windows Update that you enter or select to the corresponding parameters in your setup script.

Table 3.11 Windows Update elements

Property Page Element Description
Enable upgrade of drivers via the internet Check this box to allow upgrade of device drivers for hardware to be installed via Windows Update across the Internet.
Enable upgrade of software via the internet Check this box to allow upgrade of software to be installed via Windows Update across the Internet.
Default Windows Update local page Enter a local URL in this box to change the URL Windows Update opens if the user has never connected to the Internet before.
Default Windows Update remote page Enter a URL in this box to change the URL that Windows Update uses to download drivers and software.

Retrieving Settings from a Model Computer

When you run Batch.exe in a Windows 98 computer and you click Gather now, Batch.exe scans the model computer in the following areas:

Batch.exe cannot determine the following:

Modifying the Optional.ini File

This section describes the specifications for creating or modifying the Optional.ini file that Batch.exe uses to determine the available optional components. The syntax for the Optional.ini uses standard INI conventions:

Section Names

Section names must be unique within the entire file and must be enclosed in brackets ([ ]):

[Section_Name]

For example:

[Networks]. 
[Areas] Section

The main section in an Optional.ini file is [Areas]. This section defines the available subareas for all Optional Components. Within this section, create a key in this format:

Key#=Area_Name

where each area’s number (#) is one greater than the preceding entry. The order of these entries is unimportant. Do not enclose the Area_Name in quotes, unless you want the quotes to be part of its name.

An Optional.ini file can contain up to 20 unique areas, for example:

[Areas]
Entry1=Accessories
Entry3=Screen Savers
Entry2=Communications
Entry4=The Microsoft Network
Keys

For each area listed in the [Areas] section, there should be a corresponding section. Within each of these sections, you specify keys with the following syntax:

Key#=Component_Name,01

After the component name, include a comma and then either a 0 (do not install component by default) or a 1 (install this component by default). Keys must be unique within each section. Leading spaces are ignored, and they cannot contain semicolons (;).

An Optional.ini file can contain up to 50 unique keys within each [Area]. Batch.exe processes the section until it finds an entry number that does not exist. If Batch.exe reads an entry that does not contain a default value, it assumes a default of 0 (do not install). For example:

[Accessories]
Entry1=Cardfile,1
Entry2=Clipboard Viewer
;Clipboard Viewer will automatically be assigned a value of 0.
Entry3=Object Packager,1
Entry4=Sound Recorder,0
Entry6=Calculator,1
;Calculator won't be read because Setup will stop reading the file when it cannot find Entry5, which does not exist.

Three special categories can also be listed in the Optional.ini file: [Dependencies], [Defunct], and [NoChoice].

[Dependencies]

For optional components that have dependencies (one component must be installed in order to install another), create a section named [Dependencies].

To create a dependency, create a key using a key name that is the name of the component that requires the second component. The value of that key is the required component. Each component can have only one dependency; however, there is no limit to how deeply nested dependent components can be. (Component A can require component B, which requires component C, and so on.) Make sure you don't create a circular dependency loop (A <-- B <-- C <-- A).

There is no limit to the number of different dependencies, other than a one thousand character limit for the entire section. The following is an example of a [Dependencies] section:

[Dependencies]
Direct Cable Connection=Dial-Up Networking
;(DCC requires Dial-Up Networking.)
[Defunct]

The [Defunct] section can be used to list optional components whose names might have changed. Currently, if a user opens an existing INF file that contains optional components that are not listed in the Optional.ini file, the entries are discarded. However, before discarding them, Setup checks the [Defunct] section to see if the component has been given a new name.

Within the [Defunct] section, create a key whose name is the name of the old component name. The value of this key should be its new name. There is no limit to the number of defunct entries other than a one thousand character limit for the entire section. The following is an example of a [Defunct] section:

[Defunct]
Extra Cursors=Mouse Pointers 
(Extra Cursors new name is Mouse Pointers.)
Nature Sound Scheme=Jungle Sound Scheme
(Nature has been changed to Jungle.)
[NoChoice]

The [NoChoice] section is used to list options that cannot be changed by the user through the Windows 98 Setup user interface, even if that option appears there.

To include a [NoChoice] section, include an entry similar to the keys for normal optional components, as described earlier, plus a value for the choice: 0 (for do not install), or 1 (for install). An option listed in this section does not need to be listed anywhere else in the INI file. The following is an example of a [NoChoice] section:

[NoChoice]
Entry1=The Microsoft Network,1
(MSN will always be installed.)
Entry2=Calculator,0
(Calculator will never be installed.)
Entry3=Custom Component,1
(A third-party component that Windows Setup is 
aware of will be installed.)

Sample Optional.ini File

This section shows a sample Optional.ini file. You can add a [NoChoice] section anywhere in the file, but there can be only one [NoChoice] section.

[Areas]
Area1=Accessibility Options
Area2=Accessories
Area3=Communications
Area4=Disk Tools
Area5=Microsoft Fax
Area6=Multimedia
Area7=Screen Savers
Area8=The Microsoft Network
Area9=Windows Messaging


[Accessibility Options]
Entry1=Accessibility Options,0


[Accessories]
Entry1=Briefcase,0
Entry2=Calculator,1
Entry3=Character Map,0
Entry4=Clipboard Viewer,0
Entry5=Desktop Wallpaper,0
Entry6=DMI Mgmt Service Layer,0
Entry7=Document Templates,1
Entry8=Games,0
Entry9=Imaging,1
Entry10=Mouse Pointers,0
Entry11=Net Watcher,0
Entry12=Object Packager,1
Entry13=Online User's Guide,0
Entry14=Paint,1
Entry15=Quick View,0
Entry16=System Mgmt Infrastructure,0
Entry17=System Monitor,0
Entry18=System Resource Meter,0
Entry19=TWAIN 1.6,1
Entry20=Windows 98 Tour,0
Entry21=WordPad,1

[Communications]
Entry1=Dial-Up Networking,0
Entry2=Direct Cable Connection,0
Entry3=HyperTerminal,1
Entry4=Microsoft NetMeeting,1
Entry5=Phone Dialer,1
[Disk Tools]
Entry1=Backup,0
Entry2=Defrag,1
Entry3=Disk compression tools,1

[Microsoft Fax]
Entry1=Microsoft Fax Services,0
Entry2=Microsoft Fax Viewer,0

[Multimedia]
Entry1=Audio Compression,1
Entry2=CD Player,1
Entry3=Media Player,1
Entry4=Multimedia Sound Schemes,0
Entry5=Sample Sounds,0
Entry6=Sound Recorder,1
Entry7=Video Compression,1
Entry8=Volume Control,1

[Screen Savers]
Entry1=Additional Screen Savers,0
Entry2=Flying Windows,1
Entry3=OpenGL Screen Savers,1

[The Microsoft Network]
Entry1=The Microsoft Network,0

Creating Setup Scripts Simultaneously for Multiple Computers

You can use Microsoft Batch 98 to create up to 9,999 setup scripts simultaneously by using the Multiple Machine-Name Save command from the File menu. Using a text editor, you create a text file listing, line-by-line, the name of each of the computers for which you want to create setup scripts. Optionally, you can provide their IP addresses, which must be unique. Then, you designate the destination directory where you want to save the setup scripts.

To create multiple setup scripts at once

  1. From the File menu on the main Batch setup screen, click Multiple Machine-Name Save.
  2. Create a computer-name file (text file with all the computer names for which you want to create setup scripts.)

    Using a text editor, such as Notepad, open a text file, enter a single computer name on each line, and terminate the line with a carriage return/line feed (press ENTER after typing each name). On Microsoft networks, computer names can contain only alphanumeric characters and these characters:

    ! @ $ % ^ ( ) { } _ ~. 
    

    The following shows an example of a text file that can be used for Multiple Machine-Name Save:

    Chaos@
    Super_Computer_5, 172.30.5.4
    Print_Server_1
    Mail_Server_1
    Luna, 172.32.54.5
    Saturn
    Pluto
    

    Note that you can include an IP address for any particular computer (on the same line as the machine name, separated by a comma) without having to include addresses for all computers. In this example, ‘Super_Computer_5’ and ‘Luna’ will be set up with listed IP addresses.

  3. After you create and select the computer name file to be used, Batch.exe reads and saves all names and addresses.

    Batch.exe displays a message indicating how many computer names it read.

  4. Select a directory where all the setup script files will be saved. In the Destination of Save dialog box, find the directory you want to use. The directory must already exist. The name of the file in the File Name box is not important.
  5. After the target directory has been selected, click Save.

    Batch setup will create one INF file per name containing all the settings currently defined, using a series of files named Bstp0001.inf through Bstp9999.inf, written in the order that the names are listed in the machine name file. The only unique information in each file will be the computer name and any IP address provided. Using the previous example, the file Bstp0001.inf will contain the setup information for the computer named ‘Chaos@’ and file Bstp0007.inf will contain the setup information for the computer named ‘Pluto.’

  6. Click Close to close the Multiple Machine-Name Save dialog box.
Tips for Creating a Computer-Name File

When creating a computer-name file (text file with all the computer names for which the Multiple Machine-Name Save command creates a setup script), consider the following:

Do not use all periods for computer names. Other networks may have different requirements.

If you want to include an IP address for a given computer, put a single comma after the computer name and then type the IP address.

A single blank line signifies the end of the computer-name file. The batch-mode save process does not check for errors in these values.

If you enter incorrect information in the computer-name file, then Windows 98 Setup might stop and prompt you to enter the correct information.


Using Dbset.exe to Customize Setup Scripts and Other Files

You can use Dbset if your installation requires more customization flexibility than just being able to set the computer name or IP address. Dbset.exe is a configuration utility that allows you to individualize setup scripts and other types of text files. Dbset.exe searches and reads data from a text file (called database file in this section) and uses the data to either set environment variables or to write to an output file using a format specified by a template file. The template file can be a text file in Msbatch.inf format, a registry file, or any other type of text file.

For example, you can create a template setup script (in Msbatch.inf format) with settings that you want to use for all users in your organization or workgroup. Then, you create a database file with specific data for each user, for example, user_name, computer_name, and so on. From the template and database file, Dbset.exe creates an individualized setup script by replacing the variable names (for example user_name) with the actual name of the user (Maria).

The following examples show the syntax of the command, how to use it, and the results you obtain. In this section parameters enclosed in brackets [ ] indicate that the parameter is optional. If a value is not specified, Dbset.exe uses the default value. All the examples use the same database and template file introduced in the first two examples.

Using the Dbset.exe Command-Line Switches

Dbset.exe provides switches (some times called options) to control how it searches and reads data from a database file and how it uses the data to either set environment variables or how it writes the data in an output file.

These switches are specified on the command line as arguments for the dbset command (such as dbset /r). The specific option is preceded by a forward slash (/) character (not the backslash used to specify directory arguments).

Action

Writes data from an input text file, such as a database file, to either set MS-DOS environment variables or to write data to an output text file. If a text file is specified as the output, the data is formatted based on a template text file.

Syntax

dbset[/d [database_file]] [/f [field_name]] [/s:delimiter] [/i [template_file]] [/r [output_file]] [/m] [/o record_overlay] [/y] [data]

Parameters
delimiter
Specifies the character used to separate one field from another in a record in the database file.
field_name
Specifies the name of the field to be searched.
database_file
Specifies the name and location of the database text file.
record_overlay
Specifies a record with delimiters separating each of its fields.
template_file
Specifies the text file you want to use as a template for formatting data written to the output file.
output_file
Specifies the name of the output file where the data will be written.
Data
Specifies the data item to search for in a database file. The default is to search for the match of "data" in the first field of each record in the database file. To specify another field to search, use the /f switch.
Switches

/d database_file

Specifies the name and location of database file. The default is Dbset.db. The database file contains records or structures of information separated into fields by delimiters. Each record has the same format as the first record in the file. The first record in the file also assigns the name, or data element, of each field. The field names are the same in every record in the file and are the logical definitions of the fields. In each record following the first the fields hold data items or the actual data. For each field name there can be many fields in the database file that hold data items. At a minimum, a database must contain one record which contains the field names. A one-record database is useful only when using the /m switch.

/f [field]

Specifies a field (by name) to search for a data match in. The default is the field that makes up the first column. A field is a unit of data in a record. A collection of fields, separated by delimiters, make up a record. A data item is the actual data stored in the field.

/s:delimiter

A character used to separate one field from another in a record. The default is a comma (,). Only one character may be specified as the delimiter.

/i template_file

Specifies the name and location of the template file. The default is Template.txt. The template file will be used as the basis for the output file. Variable names in the template file are denoted in %variable% format. Actual % characters are denoted by %%. The variable names will be matched with field names in the database file and replace with the values from the appropriate record. Variable names in the template file must match field names in the database file. If the /i switch is specified, the output is always a text file.

/r [output_file]

Specifies the name and location of the file to write to. The default is Dbset.txt. Text written to the output file will be in the format of the Template.txt file with the variable names replaced by data items from the database file.

/m [data]

Specifies to prompt for each variable or field. A "data" argument may be used to specify the record to search for in the database file. The specified data from the record will be used as the prompts. When using the /m switch, your database can contain only the record that contains all the field names you want to use.

/o [record_overlay]

Overwrites the data item of the field specified. The "record_overlay" is a record with delimiters separating each field. Each field should be empty except the field to be overwritten which should contain the new data item. Only the data in the output is changed, data in the database file is not. The new data item may not contain spaces.

/y

Answers yes to all warning messages. This allows for full automation for use in scripts, such as MS-DOS.bat files

/?

Show the help screen.

Input Files: Database or Template Files

Dbset.exe accepts two types of files as input: database and template files, both in text format.

A database file is made up of records. Each record consists of a collection of fields, separated by delimiters. (A field is a unit of data.) The first record in the file specifies the field names. The actual data, stored in the fields differ, while the field names are logical definitions of the fields and are the same for each record in the file. Field names need to match with variable names in the template file.

The following shows an example of a database file.

name,machine,staticip,mailsvr
Dan,dev_02,172.30.5.1,mail-svr-70
Sam,dev_01,172.31.55.5,mail-svr-59
Pasquale,dev_03,172.25.25.1,mail-svr-40

A template file, whose default name is Template.txt, contains the format used to write to an output file with variable names denoted as follows:

%variable_name%

If the percent sign (%) is part of any text in the template file, other than where variables are specified, the percent sign should be denoted by %%. Dbset.exe replaces %% by % in the output file, when the output file is created.

A template file does not need to contain all the variables in the database, but the database must contain all the variables in the template file. If the template file contains variables that are not represented in the database file the following error appears:

Error! Wrong template file
Creating a Template File

You can create template files from a variety of text files. For example, from the following registry file:

[HKEY_CURRENT_USER\Dbsetexample\Profile\Sam]
"User"="Sam"
"MachineName"="dev_01"
"IP"=172.31.55.5
"Server"="mail-svr-59"

Note

All the examples that follow use these sample files as input files.

Example

You can create a template file that looks like this:

[HKEY_CURRENT_USER\Dbsetexample\Profile\%name%]
"User"="%name%"
"MachineName"="%machine%"
"IP"=%staticip%  
"Server"="%mailsvr%"
Changing the Default Database File Name

The following example demonstrate how to use a file name other than the default name for a database file (Dbset.txt is the default database file name).

To change the default name for the database file

Example

If you type:

Dbset /d MyDatabs.dbs /r Dan

Dbset.exe searches the file MyDatabs.dbs for the item Dan in the Name field and writes the data it found to the default output file, Dbset.txt, using the format of the default template file, Template.txt.

Example

If you type:

Dbset /d MyDatabs.dbs Dan

Dbset.exe finds the same data as in the previous example but it writes it to environment variables instead of an output file because neither the /r or /i switch were specified.

Changing the Default Search

The default Dbset.exe behavior is to search for the match of the data specified, in the first field of each record in the database file. In the sample output file described earlier, the data searched for was Sam in the Name field, which is the first field of each record. To specify another field to search for the data in, use the /f switch.

To search a field other than the default

Example

If you type:

Dbset /f machine dev_02

Dbset.exe searches for dev_02 in the Machine field in each record in the file. Then Dbset.exe writes the data found in the record to environment variables.

Using Delimiters

A delimiter is a character used to separate one field from another in a record. You can specify only one character as the delimiter. The default is a comma (,).

To use a delimiter other than the default

Example

The following two examples show how to specify a character as the delimiter in the database file. When you execute:

Dbset /s:; Sam

Dbset.exe accesses the default database file and use the semicolon (;) as the delimiter. It then finds the data Sam in the Name field of a record and uses the data to write environment variables.

Changing the Default Template File Name

The following example demonstrate how to use a file name other than the default name for a template file (Template.txt is the default template file name).

To use a template file other than the default

Example

If you type:

Dbset /r /i Temp.txt Sam

Dbset.exe uses Temp.txt as the template file instead of the default template name, Template.txt.

Creating Globally Unique Identifiers (GUIDs)

The database file can contain the variable $guid8$ and $guid10$. These entries in the database create a globally unique identifier (GUID), with either 8 or 10 characters, which is guaranteed to contain one or more of each of the following: capital letter, lower-case letter, number, or symbol.

Example

If you use the following database file, which contains GUID entries:

Name,machine,machine2,ID
johnd,jdoe,jdoe2,$guid8$
sohanl,v-samano,v-samano2,$guid10$
dspinn,dansp,dansp2,$guid10$

And you type:

Dbset johnd

Dbset.exe writes to environment variables the data found in the record, of the default database file, with "johnd" in the Name field. The environment variables might look like:

name=johnd 
machine=jdoe
machine=jdoe2
mailsvr=sD8P9x,e

Output: Environment Variables or Output File

Dbset.exe supports two types of output: environment variables or a text output file.

Using Environment Variables as Output

When the specified output is writing to environment variables, Dbset.exe sets the environment variables specified by the field names of the database

Note

To check the environment variable settings, type set at the command prompt.

To use environment variables as output

Example

If you type

Dbset Dan

Dbset.exe writes the data from the record called dan to environment variables as follows:

name=dan
machine=dev_02
staticip=172.30.5.1
server=mail-svr-70
Using a Text File as Output

Dbset.exe can also write to an output text file. To generate an output file, you must provide a template file. Text written to the output file will be in the same format as the template file, with the variable names replaced by data items from the database file. The default output file name is Dbset.txt.

To specify a text file as output

Example

If you type:

Dbset /r Sam

Dbset.exe writes the data from the Sam record to the default output file (Dbset.txt) in the following format.

[HKEY_CURRENT_USER\Dbsetexample\Profile\Sam]
    "User"="Sam"
    "MachineName"="dev_01"
    "IP"=172.31.55.5  
    "Server"="mail-svr-59"

If a template file is specified, the output will automatically be a file based on the template.

Example

If you type:

Dbset /r /i Temp.txt Sam

Dbset.exe writes the information it found in the record with the data Sam in the Name field, to the default output file in the format specified by Temp.txt.

Example

If you type:

Dbset /r MyOutput.txt Sam

Dbset.exe creates the file MyOutput.txt (if the file exists a prompt to overwrite the file will appear) and writes to it the information from the record that contains the data item Sam in the Name field. The data is written to MyOutput.txt in the same format as the default template file. If the default template file, Template.txt, does not exist, the following error message is displayed:

Error! Wrong template file!
Prompting

You can use Dbset.exe to prompt you to enter the data for each field of a record in the database file. You can specify a record that Dbset.exe will use to prompt you, or if you do not specify a record, Dbset.exe prompts you to enter the data. The database file is not modified.

To cause Dbset to prompt you for the data for each field

Example

If you type:

Dbset /m Sam

Dbset.exe accesses the default database file and displays the data in each of the fields of the record that contains Sam in the Name field. The user is prompted with each field one at a time, and has the option to edit the data. After Dbset.exe displays each field, it writes the data to environment variables.

For this example the data that Dbset.exe prompts to the user and the environment variable settings are as follows:

name=Sam
machine=dev_01
staticip=172.31.55.5
server=mail-svr-59

Example

If you type:

Dbset /m

Dbset.exe prompts the user to enter data for each of the fields in a record in the default database file. Then, it writes the data the user entered to environment variables.

Example

If you type:

Dbset /m /r

Dbset.exe prompts the users in the same way described in the preceding example but it writes the new data to the default output file (Dbset.exe) using the format of the default template (Template.txt).

Important

When the /m switch is followed with other switches, Dbset.exe assumes that the last parameter belongs to the switch specified last.

Example

If you type:

Dbset /m /r Output.txt

Dbset.exe prompts the users in the same way described in the preceding example but it writes the new data to Output.txt, using the format of the default template (Template.txt).

Overwriting Data in a Field in a Database File

You can use the /o switch to overwrite a data item in a field of the database file. To specify which field to overwrite, type the /o switch followed with as many delimiters as there are in the record of the database file. Leave each field empty except for the field you want to overwrite. In that field, type the new data. Using this /o switch does not change the data in the database file, only the data in the output is changed. The field and the new data item can not contain spaces.

To change the default name for the database file

Example

If you type:

Dbset /o ,dev_06,, Dan

Dbset.exe overwrites the data that exists in the second field (the Machine field) of the record that contains Dan in the first field (the Name field) with the new data dev_06.

Example

The following example combines several of the switches used in the previous examples in the following syntax:

Dbset /d [database_file] /r [output_file] /f [field] /i [template_file] data

Using:

database_file = Database.dboutput_file = Output.txtfield = machinetemplate_file = Temp.txtdata = dev_03

When you execute:

Dbset /d Database.db /r Output.txt /f machine /i Temp.txt dev_03

Dbset.exe accesses Database.db and the data dev_03 in the machine field of a record. It overwrites the variables of Temp.txt with the data it found. It writes this information to the output file Output.txt using the format of Temp.txt.

Adding Custom Drivers with INF Installer (Infinst.exe)

With INF Installer (Infinst.exe), you can add device drivers or network drivers to a Windows 98 installation point. When you install Windows 98 from this installation point, the added drivers will be installed as if they were part of the original Windows 98 Setup program.

To use Infinst.exe, the Windows 98 installation point must be created with write permissions.

To run INF Installer

  1. Double-click the Infinst.exe icon

    The Inf Installer window appears.

  2. In Inf to add to Windows 98 Setup, type the path and file name of the INF file you want to add to the Windows 98 installation point. For example:

    A:\Drivers\Driver1.INF

  3. In Windows 98 Setup.exe, type the path of the installation point followed by Setup.exe (the name of the Windows 98 Setup program). For example:

    \\Server1\ShareA\Setup.exe

  4. Click Add Inf.

After you performed these tasks, Infinst.exe adds the drivers and associated INF files, which are listed in the [COPYFILES=] sections of the INF files, to the Windows 98 installation point you specified. It modifies all INF files that were already located in the installation point that had matching Plug-and-Play IDs (PnP IDs), as well the Custom.inf and Infist.log files, which were also located in the installation point.

The following list provides more details on how Infinst.exe works:

Infinst.exe can add multiple INF files for single or multiple PnP devices, even if Windows 98 did not previously support them. The INF files must be compatible with Windows 98.

You can add any drivers you want with Infinst.exe and you can install or upgrade to Windows 98 following any of the methods described in Chapter 2, "Setting Up Windows 98." The drivers you added will be properly installed, regardless of what installation method you use.

Infinst.exe has the following design limitations:

The following is a typical example of adding an INF file to Windows 98 and automating setup. The steps in this example show how to install remote registry services automatically during Windows 98 Setup. This allows you to automate the installation of network clients, services, protocols, and all types of hardware devices with properly written INF files. When adding hardware INF files, it is not necessary to make changes to your custom script.

To customize Windows 98 to support remote registry services

  1. Create a Windows 98 installation point. (A share with write permissions on a network server where the Windows 98 Setup files are located.) For example:

    \\Server1\Windows98

  2. Create a custom script with Microsoft Batch 98 following the steps outlined in "Creating Custom Scripts with Batch.exe" earlier in this chapter.
  3. Following the steps outlined in "Adding Custom Drivers with INF Installer (Infinst.exe)" earlier in this chapter, add the following INF file for remote registry services:

    Regsvr.inf

    You can find this file in the \Tools\Reskit\Netadmin\Remotereg directory of the Microsoft Windows 98 compact disc.

  4. Connect to your installation point, for example \\Server1\Windows98\ and then start Windows 98 Setup by typing:

    Setup.exe Msbatch.inf at the command prompt.

    – Or –

    \\Server1\Windows98\Setup.exe Msbatch.inf in the Run dialog box from the Start menu.