Chapter 4 - Automated Installations

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.

This chapter provides information about automating Microsoft Windows 98 installations. If you intend to roll out Windows 98 on multiple computers, you can read this chapter for information on what you need to do to automate Microsoft Windows 98 Setup.

See Also

  • For information on automating Windows 98 installations with Microsoft Systems Management Server, see Appendix E, "Microsoft Systems Management Server." 

  • For information on how to define statements in setup scripts see Appendix D, "Msbatch.inf Parameters for Setup Scripts." 

Overview of Automated Installations

Cc768174.spacer(en-us,TechNet.10).gif Cc768174.spacer(en-us,TechNet.10).gif

In an environment where you need to upgrade more than a handful of computers to Windows 98, you must automate the Setup process. Automating the Setup process eliminates user interaction, standardizes the Windows 98 configuration on every desktop, and makes an organization-wide rollout easier and less time consuming. You will probably want to use an automated installation if you are responsible for installing Windows 98 on more than 50 computers.

An automated installation can be either a pull installation or a push installation. In a pull installation the user performs the upgrade, using tools provided by the administrator. In a push installation the administrator performs the upgrade, either directly or through system management software, such as Microsoft Systems Management Server.

Automating an installation is a three-step process:

  1. Create a custom setup script with the desired configuration for your users as described in Chapter 3, "Custom Installations." 

  2. Set up an installation point on the network with the Windows 98 source files. 

    Use one of the following methods to upgrade the client computers in your organization to Windows 98:

    • Use a logon script that includes a statement to run Setup with a setup script, automatically installing Windows 98 when each user logs on. 

    • Create an Apps.ini file that lets users upgrade from Windows 95 to Windows 98 simply by clicking a button. 

    • Create a system policy that includes a statement to run Setup with a setup script, automatically upgrading from Windows 95 to Windows 98 when each user logs on. 

    • Use Microsoft Systems Management Server to run Windows 98 Setup with a setup script as a mandatory job, as described in Appendix E, "Microsoft Systems Management Server." 

    • Use network management software from other vendors to install Microsoft Windows 98 based on the setup scripts you create. Refer to the documentation for your network management software for information about performing remote installation of software. 

For some types of automated installation, you should also implement version checking before running Setup to ensure that Windows 98 is not installed over itself or on an incompatible operating system.

The following sections provide details about automating installations with logon scripts, Apps.ini, and system policies, and then describes how to implement version checking.

Note The examples in this chapter direct you to add the Msbatch.inf command to setup scripts. This is good practice, but it is not necessary if the Msbatch.inf file is located in the same directory as your installation files.

Using Apps.ini for Pull Installations

Cc768174.spacer(en-us,TechNet.10).gif Cc768174.spacer(en-us,TechNet.10).gif

By creating an Apps.ini file, you can let users upgrade from Windows 95 to Windows 98 simply by clicking a button. Using an Apps.ini file provides the benefit of simplicity and the benefit that users can choose when to upgrade their operating systems.

The general process is as follows:

  1. Create a batch file that includes the Setup command, any switches you need, and any other commands you might need, such as version-checking commands. 

  2. Create a PIF file for that batch file. 

  3. Create an Apps.ini file that contains a reference to the PIF file. 

  4. Create a system policy to activate the Network Install tab in the Add/Remove Programs option in Control Panel. 

Creating the Batch File and PIF File

First, create a batch file that you can use to perform pull installations. The batch file should contain, at minimum, the following:

\\Server\Share\Setup.exe 

You could also add switches to the Setup command, and you could use the Msbatch.inf parameter. Additionally, you could add other commands, such as a section that checks the version of your operating system so users cannot run Windows 98 Setup from a Windows 98–based computer. For more information, see "Implementing Version Checking for Automated Installations," later in this chapter.

Next, create a PIF file for the batch file. For information about creating PIF files, see Chapter 25, "Application Support." Make sure to select the check box Close on exit, so the batch program window will close after it runs. Otherwise, you will have problems with Setup.

Creating the Apps.ini file

Next, create an Apps.ini file (or an entry in an existing Apps.ini file) that refers to the PIF file. For information about how to create an Apps.ini file, see Chapter 25, "Application Support." The following example shows a basic Apps.ini file:

[AppInstallList]
ProgramName = * \\Server\Share\Directory\Filename.pif

You could also use Apps.ini to set up different computers with different configurations. For example, you could use Apps.ini to set up Windows 98 with Windows NT on some computers, and Novell Client for Windows 95/98 on others. You could even control which users get which client by giving different users different levels of access to the share that contains the Setup.exe command. The following example shows this configuration:

[AppInstallList]

********************** Marketing **********************=
Windows 98 Upgrade - Windows NT=
*\\Server\Marketing_Share\Directory\WinNT.pif
-=*
************************ Sales ************************=
Windows 98 Upgrade – Novell Client=
*\\Server\Sales_Share\Directory\Client32.pif

In this example, WinNT.pif refers to a batch file that includes an Msbatch.inf statement. The Msbatch.inf file directs Windows 98 Setup to install Windows NT when performing the upgrade. Thus, when a user clicks the Windows NT entry, Windows 98 is installed with Windows NT. Likewise, when a user clicks the Novell Client entry, Windows 98 is installed with Novell Client for Windows 95/98.

Now, suppose you have given the users in Marketing network access to Marketing_Share but no access to Sales_Share, and you have given the users in Sales network access to Sales_Share but no access to Marketing_Share. The Marketing users can run Setup and get the Windows NT, and the Sales users can run Setup and get Novell Client for Windows 95/98.

Giving Users Access to the Apps.ini File

Finally, you must set a system policy so users can access the Apps.ini file. After you set the policy, a Network Install tab appears on the Add/Remove Programs option in Control Panel. The tab shows all the applications the user can install, and the user simply clicks on the application to install. To set the policy, you must first add the Appsini.adm template, then set the policy named Network path to APPS.INI.

To add the Appsini.adm template
  1. In System Policy Editor, click the Options menu, and then click the Policy Template

  2. Click Add, and then select the Appsini.adm file. This file is located in your \Windows\INF directory. 

  3. Click Open, and then click OK

To set a system policy to give users access to Apps.ini
  1. In System Policy Editor, click the File menu, and then click New Policy if you have no existing policy file, or Open Policy if you have an existing policy file. 

  2. Double-click Default Computer

  3. Click the plus sign to expand the Network Install section, and then click the plus sign to expand the Use APPS.INI for Network Installs section. 

  4. Select the check box for the policy named Enable Add/Remove Programs, Network Install tab

  5. In the Network path to APPS.INI box, specify the full network path and file name for the Apps.ini file, and then click OK

  6. In the File menu, click Save, enter a name for your policy file, and then click Save again. 

This policy adds the registry value AppInstallPath (string type) with the value of the universal naming convention (UNC) path to the following registry key:

HKEY_LOCAL_MACHINE \Software
\Microsoft\Windows\CurrentVersion 

Using System Policies for Push Installations

Cc768174.spacer(en-us,TechNet.10).gif Cc768174.spacer(en-us,TechNet.10).gif

You can create a push installation by using system policies. A push installation using system policies has the benefit of being simple to implement. You can install Windows 98 from a central location, without actually going to the computer being upgraded. However, consider the following issues if you are implementing a push installation using system policies:

  • The user can stop Setup while it is in progress. 

  • Unless you make sure to check for the operating system version in a batch file, Windows 98 Setup will run every time the user logs onto the computer, even if the computer is already running Windows 98. You cannot prevent this by creating a special user account for upgrades, as you can with logon scripts, because the policy is computer-based rather than user-based. 

The general steps for a push installation using system policies are as follows:

  1. Create a batch file that checks to see your operating system version and conditionally runs Setup. For a sample batch file, see "Implementing Version Checking for Automated Installations," later in this chapter. 

    At minimum, the batch file you create must include the UNC path for Setup, and it must check your operating system version before running Setup. You can also add Setup switches and other commands to the batch file. 

  2. Set the Run Once system policy and add a path to the batch file. 

To set the Run Once system policy

  1. In System Policy Editor, click the File menu, click New Policy if you have no existing policy file, or Open Policy if you have an existing policy file. 

  2. Double-click Default Computer

  3. Click the plus sign to expand the Windows 98 System section, and then click the plus sign to expand the Programs section. 

  4. Select the check box for the policy named Run Once, and then click Show

  5. In the Show Contents dialog box, click Add

  6. In Type the name of the item to be added, type a name for your batch file (not the file name). 

  7. In Type the value of the item to be added, type the UNC path for the batch file that installs Windows 98 only if it is running the proper operating system. For example: 

    \\Server\Share\Directory\Batch_file.bat 

  8. Click Enter, click OK, and then click OK again. 

  9. In the File menu, click Save, enter a name for your policy file, and then click Save again. 

After you have set this policy, Windows 98 Setup runs automatically when the user logs on, as long as they are not already using Windows 98.

Using Logon Scripts for Push Installations

Cc768174.spacer(en-us,TechNet.10).gif Cc768174.spacer(en-us,TechNet.10).gif

You can use logon scripts to create an automated, mandatory installation scheme for installing Windows 98 on multiple computers. This allows you to install Windows 98 from a central location, without actually going to the computer being upgraded.

You can use logon script push installations on Windows 95 computers and on computers running MS-DOS or Windows 3.x with the following real-mode network clients:

  • Microsoft Workgroup Add-on for MS-DOS 

  • LAN Manager 2.x real-mode network client 

  • Novell NetWare real-mode network client (NETX or VLM) 

  • Windows for Workgroups real-mode and protected-mode clients 

Note This method is only viable for smaller local area networks (LANs). If undue stress is placed on the network from hundreds of concurrent upgrades, the entire network can fail. However, it is a useful alternative in some situations, as when Systems Management Server is not available, staffing resources for deployment are limited, or only a few users typically log on at any one time.

This section describes logon scripts for several different configurations and explains how to set up servers for logon scripts and how to run logon scripts. For more information on logon scripts, see "Using Logon Scripts" in Chapter 18, "Logon, Browsing, and Resource Sharing."

To use logon scripts for push installations, you must do the following:

  • Install the Windows 98 source files on an installation point. 

  • Create a setup script that includes the Setup command. 

  • Create the logon scripts that will be used to start the installation process. 

  • Create the special user accounts that will be used to run the logon scripts. 

  • For Windows for Workgroups computers, create a Startup.grp file that contains the command line for starting Windows 98 Setup, as described in "Preparing a Startup.grp File" later in this chapter. 

A push installation actually begins when the user logs onto the client computer.

Because logon scripts run every time the user logs on, and the setup script includes the Windows 98 Setup command, you need to be careful so that Windows 98 Setup is run only once on each computer. The easiest way to do so is to create a special Upgrade account, which all users log onto in order to install Windows 98. This method avoids activating the Setup process again after Windows 98 has been installed. However, using a common Upgrade account might not work in some corporate environments, where INI files are copied to users' directories based on the user name specified at logon. In such cases, if Windows 98 is installed using an Upgrade account, each user's application settings will not be migrated to Windows 98. Furthermore, you can add statements to setup scripts to copy the related INI files to C:\Windows as part of the installation process.

Another method you can use with logon scripts to avoid the problem of running Setup a second time is to add a statement to the logon scripts to check the MS-DOS version with alternate actions defined when the version is Windows 98. For more information, see "Implementing Version Checking for Automated Installations," later in this chapter.

Important If the logon script processor stays in memory after you start Windows 98, and if the computer is not correctly configured to use extended memory, then there might not be sufficient memory available to run Setup. To solve this problem, you can increase the available memory before Setup begins by removing unnecessary terminate-and-stay-resident (TSR) programs and device drivers. For information about how to define statements in a setup script for changing the system configuration as part of installation, see Appendix D, "Msbatch.inf Parameters for Setup Scripts."

For login scripts on NetWare networks, you can use an exit command that runs Windows 98 Setup after the login script is complete. For Windows for Workgroups, you can use a Startup.grp file, as described in "Preparing a Startup.grp File," later in this chapter.

Preparing Logon Scripts for Push Installations for Windows 95 Clients

This section presents information about creating logon scripts that use the Upgrade account for installing Windows 98 on Windows 95 client computers.

Tip Avoid using relative path names in logon scripts and setup scripts so that you can ensure the commands are run from the correct directory.

Logon Scripts for Windows NT Servers

For client computers running Windows 95 on a Windows NT network where the Upgrade account is to be used to install Windows 98, the logon script must contain the following entry:

\\ntserver\distshare\setup.exe \\ntserver\distshare\msbatch.inf

If items being installed through the Msbatch.inf file require a mapped drive, the logon script must contain the following entries:

net use source_drive \\ntserver\distshare 
source_drive\:setup source_drive\:msbatch.inf

Table 4.1 shows the syntax for the entries in the previous example.

Table 4.1 Logon script values for Windows 95 clients on a Windows NT network 

Value

Description

Source_Drive

Maps a drive letter for the server containing the source files. Check the lastdrive= setting in Config.sys to make sure that the drive letter specified on the preceding command line is a valid logical drive letter. If it is not, the network connection will not be made, and the Setup process will fail.

\\Ntserver\DistShare

Specifies the Windows NT server that contains the Windows 98 source files.

For example, the logon script could be similar to the following:

net use k: \\ntserver\distshare
k:\setup.exe k:\msbatch.inf
Login Scripts for Protected-Mode NetWare Clients

Microsoft Client for NetWare Networks and Novell Client for Windows 95/98 (sometimes called Client 32) do not need to map a drive to the network distribution share, because both clients understand universal naming convention (UNC) syntax. You cannot call Windows 98 Setup directly as an external program, however, because the login script processor remains open in the background while Windows 98 Setup runs. This produces the error message "One or more MS-DOS-based programs running" (SU 0358). The following example will cause the error message:

#\\nwserver\install\Win98\setup \\nwserver\Win98\msbatch.inf

Therefore, you should have the login script call the program Start.exe (included with Windows 95) with the Windows 98 Setup as a parameter. For example:

#start \\nwserver\install\win98\setup \\nwserver\Win98\msbatch.inf

Start opens Windows 98 Setup as a separate process and then terminates, returning control to the login script processor. This allows Start to close normally and allows Windows to finish loading normally in the background.

Login Scripts for Real-Mode NetWare Clients

The login script for client computers running the real-mode NETX or VLM NetWare clients must contain the following kinds of entries:

map source_drive:nwserver/DistShare
source_drive:setup source_drive:msbatch.inf

Table 4.2 shows the syntax for the entries in the previous example.

Table 4.2 Login script values for real-mode NetWare clients 

Value

Description

Source_Drive

Specifies the same drive letter as specified in the Startup group.

Nwserver/DistShare

Specifies the NetWare server that contains the Windows 98 source files.

For example, for a computer running Windows 95 with a real-mode network client, the login script could be similar to the following:

map k:=nwserver1/win98
#k:setup k:msbatch.inf

In the previous example, the "#" syntax informs the login script processor that the setup command is an external command, (separate from the login script processor itself).

For more information, consult your NetWare documentation.

Using Login Script Variables on NetWare Networks

For NetWare networks, you can use login script variables to control when Setup is run and who runs it. The most common form of login script variables is a Boolean logic test that compares actual values against target values. This section provides a few example of login script variables. For more information about using variables to control login script execution, consult your NetWare documentation.

The following examples use the operating system version and the platform type to determine whether the computer should run Windows 98 Setup.

Example 1 (Client for NetWare Networks):

If "%OS_VERSION"="v7.00" 
and "%PLATFORM"="W95" 
then #start \\dist\install\Win98\setup 

Example 2 (Novell Client for Windows 95/98):

If "%OS_VERSION"="v4.00" 
and "%PLATFORM"="W95" 
then #start \\dist\install\Win98\setup 

In these examples, Setup runs only if both logic tests are true. Once Windows 98 Setup runs, the operating system version variable will have a different value and the client will not attempt to run Setup again. If the user is on a different platform, such as a Macintosh system, Setup will never run.

Logon Scripts for Other Third-Party Networks

It might be possible for computers running Windows 95 on networks other than Windows NT or NetWare to use logon scripts for a push installation of Windows 98. The logon scripts must contain the following two elements:

  • The network path to the setup files. (The path can use either UNC syntax or syntax specific to the networking software.) 

  • The proper execution of the setup command for Windows 98.

The following examples show logon scripts for OS/2 and Banyan VINES:

OS/2 Server example:

\\ntserver\distshare\setup.exe \\ntserver\distshare\msbatch.inf

Banyan VINES example:

Server@Context@share\setup.exe Server@Context@share\msbatch.inf 

The setup process might require that a drive be mapped. If so, you must add a line that maps a drive to the server and network share where the setup files are installed. The following examples show logon scripts for OS/2 and Banyan VINES in which the drives are mapped:

OS/2 Server example:

net use source_drive: \\ntserver\distshare 
source_drive:setup source_drive:msbatch.inf

Banyan VINES example:

setdrive source_drive share@group@org 
source_drive:setup.exe source_drive: msbatch.inf

Note that with the Banyan VINES Setdrive statement, there is no colon after the source drive.

Preparing Logon Scripts for Push Installations for Windows 3.1, Windows for Workgroups, and MS-DOS Clients

This section presents information about creating logon scripts that use an Upgrade account for installing Windows 98 on client computers running Windows 3.1, Windows for Workgroups, or MS-DOS. Some of the logon script statements described in this section are related to using the Startup.grp file for Windows for Workgroups, as described in "Preparing a Startup.grp File" later in this chapter.

Tip Avoid using relative path names in logon scripts and setup scripts so that you can ensure the commands are run from the correct directory.

Logon Scripts for Windows 3.x or MS-DOS Clients with Windows NT Server

For a computer running Windows 3.x or MS-DOS real-mode network client, the logon script should be similar to the following:

net start full
net use drive_letter: \\server\distshare
drive_letter:setup drive_letter:msbatch.inf

If the client computer is running on a LAN Manager or Windows for Workgroups network, the logon script must contain the net start full statement. On a Windows for Workgroups network, the real-mode network client for Windows for Workgroups or Windows 3.1 also requires the entry lmlogon=1 in the [Network] section of System.ini. This ensures that the full network redirector is loaded and the user is validated for network logon. Other logon script topics are discussed in the following section.

Logon Scripts for Windows for Workgroups Clients with Windows NT Server

For client computers running Windows for Workgroups on a Windows NT network where an Upgrade account is used to install Windows 98, the logon script must contain the following entries to use a Startup.grp file:

net use source_drive \\ntserver\distshare
rename windowsdir\startup.grp *.sav
copy path\startup.grp windowsdir\startup.grp

Table 4.3 shows the values for the entries in the previous example.

Table 4.3 Logon script values for Windows for Workgroups clients on a Windows NT network 

Value

Description

Source_Drive

Maps a drive letter for the server containing the source files. This must be the same drive letter as specified in the Startup.grp file. Check the lastdrive= setting in Config.sys to make sure that the drive letter specified on the preceding command line is a valid logical drive letter. If it is not, the network connection will not be made and the Setup process will fail.

\\Ntserver\Distshare

Specifies the Windows NT server that contains the Windows 98 source files.

Windowsdir

Specifies the relative path to the user's \Windows directory.

Path

Specifies the path to the Startup group file.

For example, for a computer running Windows for Workgroups, the logon script could be similar to the following:

net use k: \\ntserver\distshare
rename .\startup.grp *.sav
copy \winnt\system32\repl\import\scripts\startup.grp .\startup.grp
exit
Preparing a Startup.grp File

If you are upgrading computers that run Windows for Workgroups, you can create a special Startup group that is used just once to run the logon script.

The use of the Startup group is mandatory only for computers running Windows for Workgroups 3.11 with logon validation performed by Windows NT Server. In this case, the user starts Windows for Workgroups, which loads the protected-mode protocols and processes the logon script. The logon script runs on a virtual machine (VM); although Windows 98 Setup cannot be run on a VM, the logon script can be used to create a modified Startup.grp file that causes Setup to run as a Windows-based application after the logon script finishes running.

Note For computers that use a real-mode network client, logon scripts can run Windows 98 Setup directly, without using a special Startup.grp file. Only computers that use a protected-mode network client need to use the Startup.grp method to run Setup from within Windows for Workgroups.

To prepare for push installations to upgrade earlier versions of Windows
  1. Run Windows for Workgroups on a computer. 

  2. If the Startup group is not present, use the File New command in Program Manager to create a Startup group. 

  3. In the Startup group, use the File New command to create an Upgrade option that contains the following command line: 

    source_drive:setup [source_drive:msbatch_format.inf]
    
If the setup script is named Msbatch.inf and is in the \\Windows directory in the source files, you do not need to specify the script name on the command line. Otherwise, specify the drive and script name. For example: 

<pre IsFakePre="true" xmlns="https://www.w3.org/1999/xhtml">k:\setup k:\myscript.inf
Specify the same source drive used in the logon script statements, as described in the following sections on setting up the server for push installations. 
  1. Copy the Startup.grp file to the installation point on the server that contains the Windows 98 source files.

  2. Delete the group or option that you just created so that it is no longer stored on the computer where you are working. 

  3. In the Msbatch.inf file, add the following statements to make sure that Startup.grp is replaced after Setup: 

    [install]
    

renfiles=replace.startup.grp

[replace.startup.grp] startup.grp, startup.sav

[destinationdirs] replace.startup.grp=10

Login Scripts for Windows 3.1, Windows for Workgroups, and MS-DOS Clients on NetWare Networks

For information about using login scripts for real-mode NetWare clients if you are using Windows 3.1, Windows for Workgroups, and MS-DOS, see "Login Scripts for Real-Mode NetWare Clients," earlier in this chapter.

Setting Up Windows NT Server for Push Installations

This section summarizes the procedures for running logon scripts from Windows NT Server for push installations on Windows 95, Windows 3.1, Windows for Workgroups, and MS-DOS-based computers.

To prepare the server for push installations on a Windows NT network
  1. Install the Windows 98 source files in an installation point on a network server. 

  2. Create an Msbatch.inf file to meet your installation requirements, and copy this file into the installation point that contains the Windows 98 source files.

    Using User Manager for Domains on a computer running Windows NT Server, create a user account named Upgrade, and specify upgrade as the password. Also, make sure the following options are selected for the Upgrade user account:

    • User Cannot Change Password 

    • Password Never Expires 

    By default, the user account is created in the domain where you logged onto the network. To create the user account in another domain, you must select that domain before creating the account. If your users log onto multiple domains, create the Upgrade user account in each domain. 

  3. Create the logon scripts that run Windows 98 Setup. For an example of a logon script for Windows NT networks, see "Logon Scripts for Windows NT Servers" earlier in this chapter. 

  4. Assign the logon script to the Upgrade user account. The logon script must be placed in the \Winnt\System32\Repl\Export\Scripts directory on the computer running Windows NT Server. 

    The replication service replicates this from the export server to the import server, so the file is copied to \Winnt\System32\Repl\Import\Scripts on the server. 

Setting Up a NetWare Server for Push Installations

This section summarizes the procedures for running login scripts from a NetWare server for push installations on Windows 95, Windows for Workgroups, Windows 3.1, and MS-DOS-based computers.

To prepare the server for push installations on a NetWare network
  1. Install the Windows 98 source files in an installation point on a network server. 

  2. Create an Msbatch.inf file to meet your installation requirements, and copy this file into the installation point that contains the Windows 98 source files.

    On the NetWare server, create a user account named Upgrade, and specify upgrade1 as the password. Also, set the types of options for this account as described in the following list.

    • Allow User To Change Password = No 

    • Force Periodic Password Changes = No 

  3. Assign the Upgrade user account to the preferred server to which users have access. 

  4. Create a login script and assign it to the Upgrade user. The login script must be placed in the appropriate directory on the server where users will log on. For an example of a login script for NetWare networks, see "Login Scripts for Protected-Mode NetWare Clients" and "Login Scripts for Real-Mode NetWare Clients" earlier in this chapter. 

Running Logon Scripts for Push Installations

This section describes running logon scripts for push installations on Windows 95, Windows 3.1, Windows for Workgroups, and MS-DOS.

The following lists the requirements for using an Upgrade account to upgrade from Windows 95:

  • The Upgrade account must be created on the Windows NT domain, NetWare server or other network server, with a corresponding Upgrade logon script, as described in the sections "Setting Up Windows NT Server for Push Installations" and "Setting Up a NetWare Server for Push Installations" earlier in this chapter. 

  • The Upgrade logon script must contain statements to start Windows 98 Setup from a shared directory. 

To run a logon script for a push installation
  • Tell users to log onto the network using the Upgrade user account and the relevant password.

    When a user logs on, the Windows 98 installation process begins automatically, using the settings in the Msbatch.inf file specified in the logon script. 

After copying files, Windows 98 restarts the computer, runs hardware detection, and then begins the Run Once operations (group conversions, and so on). When the Run Once operations are finished, Windows 98 is completely installed. Note that this stage requires the user to log onto the network, so all configuration values must be specified in the setup script to support correct logon and to allow Windows 98 Setup to connect to the shared resources containing Windows 98 source files.

When the user quits Windows 98 at this point, Setup writes all changes to the registry. The user can restart the computer and log on using the usual logon name and password.

Implementing Version Checking for Automated Installations

Cc768174.spacer(en-us,TechNet.10).gif Cc768174.spacer(en-us,TechNet.10).gif

No matter which method of automated installation you use, it is a good idea to check the operating system version before running Windows 98 Setup. That way you can ensure that Windows 98 is never installed over itself, or on a computer running an incompatible operating system, such as Windows NT. You can do so from a batch file.

The following is an example of a simple batch file, VerCheck.bat, that checks your operating system version and runs Setup only if the computer is running Windows 95. You can tailor this batch file to your own needs.

@echo off
ver > ver.txt

find "95" ver.txt > nul
if errorlevel 2 goto broken
if errorlevel 1 goto not95
if errorlevel 0 goto found95
echo Broke while looking for 95. Please contact your network
echo administrator for help.
goto end

:not95
find "98" ver.txt > nul
if errorlevel 2 goto broken
if errorlevel 1 goto not98
if errorlevel 0 goto found98
echo Broke while looking for 98. Please contact your network 
echo administrator for help.
goto end

:not98
echo Could not identify operating system. Please contact your network 
echo administrator.
goto end

:found98
echo Found Windows 98 and will not install Windows 98.
goto end

:found 95
REM This procedure runs Setup if Windows 95 is found. If desired, you
REM could instead run another batch file.
echo Found Windows 95. Will now upgrade this computer to Windows 98.
Map S: \\Server\Share
S:\Directory\Setup
goto end

:broken
echo Could not upgrade this computer to Windows 98. Please contact your
echo network administrator.
goto end

:end

You can refine this sample batch file in many different ways. For example, note that this batch file runs Setup immediately after discovering that the computer is running Windows 95. By using two batch files, you could ensure that Setup waits until the next boot.

To ensure that Setup waits until the next boot

  1. Create a batch file named Winstart.bat that runs Setup, and place it on a network server. 

  2. Create a second batch file that checks for Windows 95, and if it finds Windows 95, copies a second batch file named Winstart.bat from the network server to the user's \Windows directory.

    Note This step will not work if users have renamed their Windows directories. 

Cc768174.spacer(en-us,TechNet.10).gif