Windows

Automate Windows XP installations using the Setup Manager and a CD-ROM drive

Scott Lowe tours the Windows XP Setup Manager for multiple installations. He describes how to get started with Setup Manager and configure the answer file. He also gives a tip on creating a bootable CD-ROM to use for your automated installations.

Over the years, Microsoft has come up with unique (sometimes flawed) ways to deploy its operating systems for a large user base. Installing Windows on a number of machines has never been a lot of fun, but you can make it easier to install a standard image across all your machines. One method is the Windows Setup Manager, which comes with Windows XP. I’ll discuss the process of using Setup Manager and describe a technique for using your CD-ROM drive to complete the process automatically.

Install the Windows Setup Manager
To use the Windows Setup Manager included with Windows XP, you must install the Windows Deployment Tools from the Windows XP CD while logged on as a user with administrative rights to the machine. Don’t use the graphical menu that is presented when you insert the Windows XP CD-ROM into your computer. Instead, browse to the \support\tools folder on the Windows XP CD and double-click the deploy.cab file to view its contents (see Figure A).

Figure A
The contents of the deploy.cab file


Select all the files in deploy.cab and then right-click one of them and choose Extract from the shortcut menu (Figure B).

Figure B
Extract the contents of deploy.cab.


When you choose to extract these files, a dialog box labeled Select A Destination will open. The location that you choose here is where the files from deploy.cab will be placed. Click on the C: drive and click the Make New Folder button to create a new directory in which to place these files. For this example, I’m naming this new directory Windows Setup Manager (Figure C).

Figure C
Create the Windows Setup Manager directory.


Next, click the Extract button to extract the contents of deploy.cab into C:\Windows Setup Manager. All the files that you need to create automated Windows XP deployment scripts are in this directory.

Using the Windows Setup Manager
The Windows Setup Manager works by creating or modifying an answer file. After you have it installed, you can run the Windows Setup Manager in all its glory by browsing to the folder where you extracted the files and double-clicking on setupmgr.exe. This will start the Windows Setup Manager wizard. Click Next to move on.

The next screen will give you the choice to create a new answer file or modify an existing answer file. If you’re using this tool for the first time, you’ll need to create a new answer file. If you instead wish to change the values for a previous Windows Setup Manager session, choose to modify an existing answer file and provide the wizard with the path to the file. For this example, I’ll create a new answer file. Click Next to continue.

In the next step of the process, you need to determine how you’ll be rolling out new Windows workstations. You can create an answer file for an unattended installation, a sysprep installation, or a Remote Installation Services (RIS) installation. At the end of this process, I’ll move everything to a custom Windows XP installation CD to provide for an unattended installation, so I’ll keep the default of Windows Unattended Installation and click Next to continue.

This version of Windows Setup Manager supports both versions of Windows XP as well as Windows 2002. I’ve never used this method to roll out servers, so I don’t know if this is a typo for “Windows 2000” or if this utility is meant to support the forthcoming Windows .NET products instead. For the purposes of this demonstration, it doesn’t matter since I’m going to roll out a Windows XP Professional workstation, which I’ll choose from the list. Then I’ll click Next.

Next, you can choose the level of interaction that you wish the installer to have with the user. You can choose to simply do all the work for the users so that they just sit there and stare at the screen while the installer works its magic, or you can have the installer provide default answers that the user is allowed to change during the installation process. The levels are as follows:
  • ·        Provide defaults – Provide default answers to the user during installation, allowing the user to make changes where desired.
  • ·        Fully automated – The user watches the screen as the installer is configured with an answer to every question.
  • ·        Hide pages – Give the user as little as possible by not even showing the configuration pages for which you have provided all of the answers.
  • ·        Read only – Do not allow the user to change any information on any unhidden pages.
  • ·        GUI attended – Automate only the text portion of the installation. Allow the user to complete the GUI phase as normal.

For this example, I want to fully automate the installation, so I choose the appropriate action and click Next.

The installer can be configured to install XP from a network folder or from a distribution CD-ROM. I’ll install from a CD, so I’ll choose that option and click Next.

The next step of this process will ask you to agree to the terms of the End User License Agreement (EULA) for the version of Windows that you plan to install using this method. For this example, I’ll accept the license agreement and click Next.

Note
While it’s easy to bypass this step, I encourage you to at least peruse the Windows EULA as well as those for subsequent service packs. Microsoft has been inserting additional restrictions and “access rights” to machines in subsequent service packs, so it’s important to know what you might be signing away by installing one of these products.

The next several steps of the wizard will ask for answers to the various questions that are asked during the installation of Windows XP Professional. These screens are self-explanatory and dependent on your computing environment. However, one note about the General Settings tab on the Providing The Product Key screen is important. The way you handle this step is determined by your licensing agreement with Microsoft. If you’ve bought into a licensing program, you may have a single product key for all your Windows XP installations. If you have not and have instead purchased copies of XP, leave this step blank and provide the product key during the installation. If you do decide to leave this field blank, you won’t be able to use the Fully Automated option that was previously selected. Go back and choose an option such as Hide Pages, which will allow the user to enter the Product ID.

Naming a system on the Windows network is also an important aspect to this process. You can either type a bunch of names in the list (typing each name and then clicking Add), import an existing list, or allow the installer to pick a name based on the organization name. I’ll choose the third method for this example (Figure D). Next, I’ll set and encrypt the Administrator password (Figure E).

Figure D


Figure E


These are all of the custom settings I’ll be providing to the installer. The remaining network settings and advanced settings are sufficient for a working, adequately localized version of Windows XP Professional. These settings will install a U.S. version of Windows XP using U.S. English in a folder named Windows. For networking, the new machine will be placed in a workgroup named WORKGROUP and will use DHCP to get its address. No printers will be installed for this demonstration. To complete the answer wizard, click Finish.

The completed product
The last step in this process is to save the answer file as unattend.txt in C:\Windows Setup Manager (Figure F).

Figure F


A this point, you’ll have an answer file and a batch file that can be put on a boot floppy and used to automate the installation of Windows XP. This sidebar displays the contents of the answer file based on these parameters.

Let’s do one better…
Who wants to use a floppy disk anymore along with the Windows XP CD? Not me. I’d rather create a Windows XP CD with the answer file already on it and ready for use so that I can just boot the CD and Windows will install. Luckily, a generous soul named Bart has provided detailed instructions as well as a couple of utilities that make the creation of bootable CDs a breeze. Of course, this requires that you have a CD burner available to use. CD burning software is not required, though, because you’ll be using a specialized utility.

All you have to do is download these three utilities:
  • ·        Cdrpack – As of this writing, Bart is providing version 1.3 of cdrpack, a workspace where you can build a bootable CD-ROM.
  • ·        Windows XP add-on – This contains the Windows XP bootstrap loader.
  • ·        ASPI Manager – This is Nero’s ASPI Manager. It’s required for the CD to be burned. You should save this to your \windows\system32 directory.

Extract the contents of the first two files to the same directory, making sure to expand the subdirectories during the unzipping process. I’ve put them in C:\downloads\cdrpack13 on the same system that I used to create the unattended installation script. Second, you need the files that Windows XP uses for its installation. From your Windows XP CD, copy the i386 folder to the cds\wxppro_us\disk1\ directory. This directory can be found in the same directory as the expanded cdrpack and Windows XP add-on.

Third, since I’m planning to create a Windows XP Professional CD, I need to copy the files win51ip and win51 from the Windows XP CD to the same location. For Windows XP Home, the two files are named win51ic and win51. In addition, copying autorun.inf, readme.htm, and setup.exe is recommended. Finally, I need to copy the two files that were created earlier—unattend.bat and unattend.txt—to cds\wxppro_us\disk1\ as well. I’ll rename unattend.bat as autoexec.bat and unattend.txt as winnt.sif. The file named winnt.sif is required when performing a CD-based unattended installation of Windows.

Once all this is done, it’s time to burn the CD. Assuming that everything is set up properly as stated above, you'll have a bootable Windows XP CD with a mostly automated installation procedure. Only the text version still asks for user input, although I’m sure that with a little effort, that portion could also be automated. I tested this on my laptop by installing a Windows XP system under VMware and it worked like a champ. The entire GUI portion of the installation was automated and I didn’t have to provide the installation details. All in all, it’s a very effective way to baseline a system.
0 comments