BUY THIS BOOK
Add to Cart

Print Book $44.95


Add to Cart

PDF $35.99

Safari Books Online

What is this?

Add to UK Cart

Print Book £31.95

What is this?

Looking to Reprint or License this content?


Windows XP Cookbook
Windows XP Cookbook

By Robbie Allen, Preston Gralla
Book Price: $44.95 USD
£31.95 GBP
PDF Price: $35.99

Cover | Table of Contents | Colophon


Table of Contents

Chapter 1: Introduction
The Windows operating system (OS) has come a long way in the last 10 years. In the early days of Windows NT, system crashes were common annoyances that users and administrators had to learn to deal with. There were few tools to manage the OS, and the ones that were available, mainly of the graphical variety, were limited in functionality and didn't scale well. Also at that time, Microsoft was not yet serious about providing intuitive scripting interfaces or mechanisms to deploy configuration changes, which would allow administrators to automate repetitive tasks. The result was that administrators were forced to do a lot with little.
The tides changed dramatically with the release of Windows 2000, which turned out to be much more scalable and manageable. Microsoft began to improve in the management areas it had previously lacked by adding more tools and introducing several new scripting interfaces that were robust and easy to use.
But in many ways, Windows 2000 felt like a first version release of a major piece of software, which it was. Windows 2000 did a lot of things right, but there were still major gaps in terms of usability and features. Windows XP, Microsoft's latest client OS, is a much more mature platform. It isn't as big of an upgrade as Windows NT to Windows 2000, but Microsoft smoothed out a lot of the rough edges that were present in Windows 2000.
You can't get all of this capability wrapped up into a single OS without some trade-offs. To be able to take full advantage of Windows XP, you have to know lots of gory technical details. You have to know how to navigate through the hundreds of dialogs and menus. You have to know which command-line utilities are available to accomplish various tasks, where to find them, and which options you should use for each utility. You have to know what scripting interfaces are available to automate tasks so you can keep your support costs low. We take it for granted, but that is a lot for any one person to know. We've been doing Windows system administration for nine years and we still have a difficult time recalling the correct tool or command or scripting interface for certain tasks.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Approach to the Book
If you are familiar with the O'Reilly cookbook format that you can find in other popular books such as Active Directory Cookbook, Perl Cookbook, or Windows Server Cookbook, then the layout of this book will not be new to you. It is composed of 20 chapters, each containing 10 to 30 recipes that describe how to perform a particular task. Within each recipe are four sections: Problem, Solution, Discussion, and See Also. The Problem section briefly describes the task the recipe addresses and when you might need to use it. The Solution section contains step-by-step instructions on how to accomplish the task. Depending on the task, there could be several sets of solutions covered. The Discussion section goes into detail about the solution(s). The See Also section contains references to additional sources of information that can be useful if you still need more information after reading the discussion. The See Also section may reference other recipes, Microsoft Knowledge Base (MS KB) (http://support.microsoft.com/) articles or documentation from the Microsoft Developers Network (MSDN) (http://msdn.microsoft.com).
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
At Least Three Ways to Do It
People like to work in different ways. Some prefer graphical user interfaces (GUI) while others like command-line interfaces (CLI). And experienced system administrators like to automate tasks using scripts. Since people prefer different methods, and no one method is necessarily better than another, we decided to write solutions to recipes using as many of each as is available. That means instead of just a single solution per recipe, we include several using GUI, CLI, and scripting examples. That said, some recipes cannot be accomplished with one of the three methods or it may be very difficult to do with a particular method. In that case, we cover only the applicable methods.
In the GUI and CLI solutions, we use standard tools that are either provided with the operating system or available for download from Microsoft's web site. But because there is a lot of good freeware and shareware out there, we also include a section on applicable tools you can download that can help you accomplish the task.
We took a similar approach with the scripting solutions. While one of the authors prefers Perl, we focus on VBScript due to its widespread use among Windows administrators. It is also the most straightforward from a coding perspective when using Windows Management Instrumentation (WMI) and Windows Script Host (WSH). For those familiar with other languages such as Visual Basic, Perl, and JScript, it is very easy to convert code from VBScript. For those of you who wish that all of the solutions were written with Perl instead of VBScript, you are in luck. On the book web site we've posted companion Perl scripts for each VBScript example. Go to http://www.rallenhome.com/books/ to download the code.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Where to Find the Tools
For the GUI and CLI solutions to mean much to you, you need access to the tools that are used in the examples. For this reason, in the majority of cases and unless otherwise noted, we used only tools that are part of the default operating system or available in the Resource Kit or Support Tools.
The Windows Server 2003 and Windows 2000 Resource Kit tools can be installed on Windows XP and provide numerous utilities that aid administrators in their daily tasks. More information on the Resource Kit can be found at the following web site: http://www.microsoft.com/windows/reskits/. Some of the Resource Kit tools are free; for others you must buy the Resource Kit.
Windows Support Tools also includes many "must have" tools for people who work with Windows XP. The installation MSI for the Windows Support Tools can be found on an XP CD in the \support\tools directory.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Running Tools with Alternate Credentials
A best practice for managing Windows XP systems is to create separate administrator accounts and grant them elevated privileges, instead of letting administrators use their normal user account that they use to access network resources. This is beneficial because an administrator who wants to use elevated privileges has to log on explicitly through an admin account instead of having privileges all the time, which could lead to accidental changes. With the separate account method, the administrator would need alternate credentials to use tools to administer systems unless he or she logged on (locally or with Terminal Services) to the target machine using admin credentials.
There are several ways to specify alternate credentials when running tools. Many GUI and CLI tools have a user and password authentication option. If the tool you want to use does not have that option you can use the runas.exe command instead. The following command runs the enumprop.exe command under the credentials of the administrator account in the rallencorp.com domain:
> runas /user:administrator@rallencorp.com /netonly "enumprop LDAP://dc1/
dc=rallencorp,dc=com"
Sometimes it is convenient to create an MMC console that runs under administrator privileges. In this case, simply use mmc.exe as the command to run from runas:
> runas /user:administrator@rallencorp.com /netonly "mmc.exe"
This will create an empty MMC console from which you can add consoles for any snap-in that has been installed on the local computer. This is beneficial because all of the consoles that you add will be run under that administrative account. If you don't want to type that command over and over, simply create a shortcut on your desktop and put the command as the target path. By doing this you eliminate one of the common complaints about using alternate credentials, that is, it makes the job more tedious.
The /netonly option is necessary if the user you are authenticating with does not have local logon rights on the computer from which you are running the command, or if you want to authenticate with an account from a non-trusted domain.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
A Brief Word on Windows Scripting
Much has been said over the years about how unfriendly the Windows OS is to experienced power users and system administrators who want to automate tasks with scripts. We're pleased to say that Microsoft has made some great strides in this area over the last four or five years so that now there are very few tasks that you cannot automate with a script.
Microsoft has developed three primary scripting interfaces over the years: WSH, WMI, and ADSI. Note that we said that these are interfaces, not languages. In generic terms, a scripting interface is just a framework for how a script calls functions or methods to perform tasks. WSH is the scripting engine that acts as the interpreter for the scripting languages that are native to Windows (i.e., VBScript and Jscript). It has an interface for doing basic scripting such as printing out to a console or displaying a dialog box, processing command-line arguments, and other basic system administration tasks such as reading and writing files and manipulating the Registry. WMI is the high octane system management interface. With it you can query and often configure many of the components within Windows. WMI is to computers what ADSI is to Active Directory. ADSI is the primary scripting interface for querying and manipulating objects in Active Directory. You can also use it to manage local users and groups on a computer as well as the IIS Metabase.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Where to Find More Information
While it is our hope that this book provides you with enough information to perform the majority of Windows system administration tasks you are likely to do, it is not realistic to think every possible task can be covered. In fact, there are easily another five or six chapters we could have included in this book, but due to space and time considerations it was not possible for this edition. There is a wealth of additional resources and information you can find on the Internet or in a bookstore. In this section we cover some of the ones we use most frequently.
Windows XP comes with a new feature called the Help and Support Center, which is available directly off the Start menu. It is a great resource of information and it serves as the central location to obtain help information about the operating system, applications, and installed utilities.
If you have any questions about the complete syntax or usage of a command-line tool we use in the book, you should first take a look at the help information available with the tool. The vast majority of CLI tools provide syntax information by simply passing /? as a parameter. For example:
> netsh /?
The Microsoft Help and Support web site is a great source of information and is home to the Microsoft Knowledge Base (MS KB) articles. Throughout the book we include references to pertinent MS KB articles where you can find more information on a topic. You can find the complete text for a KB article by searching on the KB number at the following web site: http://support.microsoft.com/default.aspx. You can also append the KB article number to the end of this URL to go directly to the article: http://support.microsoft.com/?kbid=.
MSDN contains a ton of information on Windows XP and programmatic interfaces such as WMI. Throughout the book we'll sometimes reference MSDN pages in recipes where applicable. Unfortunately, there is no easy way to reference the exact page we're referring to unless we provided the URL or navigation to the page, which would more than likely change by the time this book is printed. Instead, we provide the name of the title of the page, which you can use to search on via the following site:
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 2: Operating System Installation and Maintenance
Windows installations have matured over the years and have become the gold standard for user-friendly setup procedures across all different platforms. Most users will encounter the installation process only once—when they first purchase Windows XP—and those who buy computers with Windows XP pre-installed are subjected to even less of the installation procedure. Thus, the majority of advice in this book will be about using and administering Windows XP after it is installed.
However, there are always some things to remember when preparing for a Windows XP deployment, creating customized installations of multiple operating systems, and keeping those deployments up to date, and that is the focus of this chapter. You'll find recipes that include very generic solutions, as sometimes there is only one way to do it, but you'll also find other recipes including both GUI and command line methods, and some recipes on updating Windows XP that include Group Policy methods.
You want to get ready to install Windows XP on your machine.
You'll need the following items handy to complete the installation:
  • The XP professional installation CD, if you're using this type of medium for the installation
  • The product key for your version, which can be found on the back of the CD jewel case for retail versions. For network installations and other volume editions, you'll need to check with the person in your organization that is in charge of licensing.
  • Details about your Internet or network connection, such as whether you are assigned an IP address or obtain one automatically from your provider via DHCP, usernames and passwords, and miscellaneous server addresses. You can probably find all of this information in a welcome letter or packet you received from your Internet service provider when you signed up.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Introduction
Windows installations have matured over the years and have become the gold standard for user-friendly setup procedures across all different platforms. Most users will encounter the installation process only once—when they first purchase Windows XP—and those who buy computers with Windows XP pre-installed are subjected to even less of the installation procedure. Thus, the majority of advice in this book will be about using and administering Windows XP after it is installed.
However, there are always some things to remember when preparing for a Windows XP deployment, creating customized installations of multiple operating systems, and keeping those deployments up to date, and that is the focus of this chapter. You'll find recipes that include very generic solutions, as sometimes there is only one way to do it, but you'll also find other recipes including both GUI and command line methods, and some recipes on updating Windows XP that include Group Policy methods.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Preparing to Install Windows XP
You want to get ready to install Windows XP on your machine.
You'll need the following items handy to complete the installation:
  • The XP professional installation CD, if you're using this type of medium for the installation
  • The product key for your version, which can be found on the back of the CD jewel case for retail versions. For network installations and other volume editions, you'll need to check with the person in your organization that is in charge of licensing.
  • Details about your Internet or network connection, such as whether you are assigned an IP address or obtain one automatically from your provider via DHCP, usernames and passwords, and miscellaneous server addresses. You can probably find all of this information in a welcome letter or packet you received from your Internet service provider when you signed up.
  • The name of your computer, and the name of the workgroup or domain to which it belongs. For machines that will join a domain, you'll need an account on the domain and the password associated with that account. For workgroup installations, all you need is the name of the workgroup.
If you have a machine currently running another version of Windows, and you wish to upgrade to Windows XP, run the Windows XP Upgrade Advisor, which you can download from the Microsoft web site at http://www.microsoft.com/windowsxp/pro/upgrading/advisor.mspx. The Upgrade Advisor examines your system's hardware and software and lets you know whether Windows XP will run on the system. It will also ping Microsoft's web site and let you know of any updates you can download that will further prepare your system for the upgrade, and even install those updates for you if you'd like.
The code that makes the Windows XP Upgrade Advisor work is taken directly from the Windows XP installation code, so while you are running the tool, you may see messages that imply you're installing the OS. You can safely ignore that insinuation.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Installing from a CD or DVD
You have a CD or DVD of Windows XP, and you want to perform a clean installation of Windows XP on your computer using it.
It's a fairly effortless procedure to install Windows XP onto systems.
  1. Turn the system power on and insert the Windows XP CD into the drive. If you receive a prompt to select from what location to boot, choose the option to boot off the CD. The system will boot a minimal, text-only version of Windows XP into main memory and begin the initial installation procedure.
  2. Select the Clean Install option.
  3. Read the terms of the license agreement. If you accept (which, of course, you have to do in order to continue installation), hit F8 to continue.
  4. Partition your disk, as described in the Discussion section. Figure 2-1 shows the disk partitioning screen.
    Figure 2-1: The disk partitioning screen
  5. Select the file system with which you want the partition formatted and press Enter to start the format. The remainder of this book will assume your Windows XP installation resides on a partition formatted with the NTFS file system. This process can take up to one hour to complete, depending on the size and speed of your drive. If your hard drive is new or you have already formatted it, you can choose the Quick Format option for near-immediate results.
  6. Enter the location where you want the actual Windows XP system files. We recommend accepting the default location, %systemroot%\windows.
  7. Wait for the file copy to finish. If you are downloading the files via a modem, this can take up to five minutes. Once the copy is complete, the system will reboot, and the next portion of the installation will commence in graphical mode.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Installing from a Network Share
You want to install Windows XP from a file share located on your network.
Without a lot of work, you can only do this from a machine running an existing copy of Windows XP. This of course means that you'll have to perform either an upgrade to your current operating system or a multiboot installation, in which a clean copy of XP is installed alongside your current operating system.
To run XP's installation program from a network share:
  1. Boot your existing version of Windows on your target machine.
  2. Browse to the network location where the Windows XP distribution files are located.
  3. Run WINNT32.EXE.
The Setup program will run and create a local copy of the Windows XP distribution files that are located on the file share. Once the copy process is complete, Windows will prompt you to reboot. After the restart, you can now follow the instructions, beginning with step 8, which can be found in Recipe 2.2.
Installing XP from a network share isn't a very efficient way to distribute XP to multiple machines unless you have only a handful of systems on your network. The most common reason to install the operating system this way is to share out one CD or DVD drive across the network and not shuffle CDs around to multiple machines. However, for any more than five computers, we recommend finding an alternate method of installation, particularly using the client deployment features of Windows Server 2003.
Recipe 2.6 for installing from Remote Installation Services
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Installing from an Unattended Installation
You want to use a script file to have a completely "hands-free" installation of Windows XP, particularly for use on multiple computers.

Using a graphical user interface

Use Setup Manager to generate an unattended setup file based on your responses to different prompts.
  1. On the Windows XP distribution CD, navigate through the Support\Tools folder hierarchy.
  2. Double-click the deploy.cab file.
  3. Select all files inside the new folder, and select Copy to Folder from the Edit menu.
  4. Copy the files to a directory on your hard disk. You may need to create this directory using the Make New Folder button.
  5. Inside the new folder, launch Setup Manager by double-clicking on setupmgr.exe.
Once Setup Manager has started, you'll be prompted either to create a new answer file or to edit an existing one. Choose to create a new one, and click Next. Now, you're presented with several options, depending on the particular application for which your new answer file will be used. You can create a basic unattended setup answer file, one that can automate the mini-Setup program inside an installation that has been run through the SYSPREP utility (more on this later), or a file that will control installations started with RIS, or Remote Installation Services. Both of these are covered later in this chapter. For now, select to create a normal, basic unattended setup answer file, and click Next.
The next screen prompts you to choose the operating system for which you're creating an unattended install—you can create files for all editions of Windows XP and all editions of Windows Server 2003 except Datacenter, too, so the Setup Manager utility is more useful than it might otherwise appear. Choose to install Windows XP and click Next. At this point, you can now choose what level of "hands-off" you wish to achieve: a completely hands-on installation with customized defaults read from the answer file, a fully hands-off installation that is started from the command line and not finished until Windows XP is completely installed, and most options in between. Choose Fully Automated to get the full breadth of options that Setup Manager can manage, and click Next.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Cloning Windows XP Installations
You have one machine that you'd like to clone onto multiple machines.
Use SYSPREP to accomplish this. First, configure and arrange the initial machine as you like it, using the local administrator account. Then:
  1. Create a new local administrator. See Chapter 15 for instructions on creating local users.
  2. Log out of the local administrator account and log in to the new account you created.
  3. Navigate to the System applet inside Control Panel. Under the Advanced tab, click the User Profiles button.
  4. Select the one called Administrator that has the local machine's name in it, and click Copy To.
  5. Click Change in the Permitted to Use section.
  6. Select Everyone in the list. This gives permission for anybody logged into the computer to use the contents of the profile. Click OK.
  7. Click OK to get out of the Copy To dialog box.
  8. Finally, copy the contents of the Documents and Settings\Administrator folder to Documents and Settings\Default Users. Ensure that you are displaying hidden files and folders so that you copy all configuration files.
  9. Now, run SYSPREP with the following command:
    > sysprep -reseal -quiet -mini -pnp
    SYSPREP will strip the SIDs off the system, scrub any personal identifying information from the image, and then shut down the machine. From that point, use a drive copying utility to move the images to multiple machines.
    Once the copy is complete, reboot the computer without the floppy and proceed through mini-Setup again, so that all personal information can be restored and new SIDs can be generated. Do this on the cloned computers and the original "prototype" computer.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Installing from Remote Installation Services (RIS)
You want to use a menu-based system to deploy Windows XP on systems without similar hardware (in other words, machines unsuitable for cloning).
You can use a feature of Windows 2000 Server and Windows Server 2003, called Remote Installation Services (RIS), to deploy Windows images onto systems with varied hardware bases. Here's how.
RIS depends on the ability to network-boot your client computers and transfer the image to them. The process to do so depends somewhat on the client computer: some corporate-targeted PCs have options in the machine's BIOS to boot from the network, usually found in the area that determines the boot order of the storage devices. Other computers offer an option directly during the POST process to press F12 or some similar key to perform a network service boot (the Compaq Armada E550 I'm using to write this now uses the latter method, whereas the Dell Precision Workstation that is my main desktop computer uses F10).
However, some older computers—and yes, some newer computers as well—don't have the option to boot to the network in their BIOS or during POST. In this case, you'll need to use the RIS remote boot disk, mentioned earlier in this chapter as the saving grace for some machines. The Windows Server 2003 RIS disk supports 32 network adapters, all of which are PCI cards. If your Ethernet card is on that list, then RIS will work even if the machine doesn't directly support PXE, the Preboot eXecution Environment. To generate the network boot disk, navigate to the \RemoteInstall\Admin\i386 directory on your RIS server machine, and double-click on RBFG.EXE. It will prompt you to insert a disk which it will then format and reconstruct as the RIS remote boot disk.
On to actually performing the deployment: insert the boot floppy or select the option to boot from the network, which applies in your case. If you use the boot floppy, you will see a screen similar to the following:
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Troubleshooting Installation Problems
You're having problems with Windows XP's installation process and want to know where to look for trouble.
Here are some common problems and suggested workarounds:
Disk space errors
If you're getting messages like "Not enough disk space for installation," then perhaps it's time to look at your partitioning scheme and create another partition from any existing free space on the hard disk. If you don't have any free space left, you'll almost positively have to delete files on the original partition to make space for the installation. However, if you have a larger drive available, you can clone your smaller drive to the larger one and remove this limitation.
Windows simply won't boot
Make sure that all the installed hardware is detected, and make sure that all of the hardware in your system is listed on the Hardware Compatibility List, which can be found from the Microsoft web site at http://www.microsoft.com/windows/reskits/webresources.
STOP messages
Check the Microsoft Knowledge Base at http://support.microsoft.com by entering the code for the STOP error that's displayed on the blue error screen. Chances are, there are good workarounds for the error you're seeing listed there. STOP messages are usually caused by either unstable hardware or incorrect driver installations, so again, double-check to make sure your hardware is on the HCL.
Setup fails during text mode
Try to remove legacy boot devices, like old CD-ROM drives or floppy drives, on modern systems because these settings cannot be reliably detected and accounted for by the Setup program. Also, make sure that the Plug and Play operating system option is disabled in the BIOS.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Upgrading to Windows XP
You want to install your copy of Windows XP over your existing operating system, thereby preserving your current applications, settings, and data.
Insert your Windows XP CD into the drive, and allow the automatic menu to appear. Click on the Install Windows XP option, and wait for Setup to launch.
One of the first things you will see upon the upgrade process beginning is a prompt, asking whether you want to connect to the Web to update the install routine. This is known as the Dynamic Update process, and updates to the Setup program itself are downloaded to make sure it's completely up to date before the OS upgrade commences.
A few steps later, the Setup program will generate a report from the Upgrade Advisor. You were introduced to this program in Recipe 2.1. If you haven't yet run the tool, leave the default and let Setup identify possible problems it thinks will crop up, including both hardware and software compatibility issues.
Then, simply follow the procedure in Recipe 2.2, beginning with step 8 after your first reboot.
Upgrading to Windows XP is uneventful. You might think this section is ridiculously short, but in reality, Microsoft has done such a good job addressing upgrade scenarios that they really are simple, almost akin to applying a service pack. (After all, it's not a big confidence booster in a core operating system when upgrades completely fail.)
The only key to an even smoother installation is to ensure that your existing Windows operating system is configured exactly as you want it, and that all third-party software installed on the system, be it application software or drivers, is compatible with Windows XP. It can be a nasty surprise to launch the newly upgraded system and see a blue screen before ever logging on.
A note for older hardware owners: even if the compatibility test gives a green light, upgrading Windows 95 and Windows ME systems with older hardware specifically not detected or known to XP can be very traumatic. Relying on the compatibility checker is not the best method. Emphasis must be placed on checking at a minimum each and every hardware vendor for Windows 2000 or Windows XP drivers and doing BIOS updates if available.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Creating a Multiboot Installation
You want to install Windows XP, but you also want to keep your current installation of Windows intact.
You can install more than one OS on your machine. When you first turn on the computer, or every time you restart, you can then select which operating system you want to use. This is called "multibooting."
To multiboot Windows XP with Windows 95, 98, ME, or MS-DOS:
  1. Make sure your hard disk is formatted with either FAT or FAT32.
  2. Install the operating systems that will co-boot with Windows XP, in the following order as applicable: MS-DOS, Windows 95 or 98, Windows ME. Follow the normal installation procedure for the operating system.
  3. Install Windows XP, selecting a different volume for the XP installation when you are prompted to select the target disk for installation.
To multiboot Windows NT 4.0 with Windows XP:
  1. Make sure your hard disk is formatted with FAT, FAT32, or NTFS.
  2. Install Windows NT 4.0, using the normal installation procedure for the operating system.
  3. Upgrade the NT installation to at least Service Pack 5, in order to install the support for the latest NTFS version used in Windows XP.
  4. Install Windows XP, selecting a different volume for the XP installation when you are prompted to select the target disk for installation.
Finally, once your installations are completed, to specify the default operating system that your computer will boot with, do the following from within Windows XP:
  1. Go to Start, and open the Control Panel.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Troubleshooting Multiboot Problems
You are having problems with more than one operating system installed on your computer, and you need to know where to start looking to fix it.
If you receive the following error:
Windows XP could not start because the following files were missing or corrupted:
WINDOWS\SYSTEM32\CONFIG\SYSTEM NTLDR MISSING
You can try to repair this file by starting the Windows Setup program from 
original floppies or boot from CD-ROM.
Select 'r' at first screen to repair
this probably happened because you installed Windows NT after Windows XP, or because you reinstalled Windows NT. The easiest fix is to start the Recovery Console, as described in Recipe 2.7, and at the prompt, type fixboot.
If your dual-boot with Windows NT isn't working, check out the following suggestions:
  • Make sure your hard drive is formatted with FAT16 or NTFS, not FAT32.
  • Upgrade your NT installation, if you can access it, to at least Service Pack 5 and preferably Service Pack 6a.
If you get the following message in one of your installations:
iexplore caused an Invalid Page Fault in module kernel32.dll
then you need to reinstall each of your operating systems on a separate partition, if not a separate hard drive altogether. This is a confirmed error in the interactions between multiple operating systems on the same disk. Multiple installations of Windows XP, however, do not see this error.
If you don't see a boot menu when starting your computer, you probably installed another operating system after Windows XP. Reinstall Windows XP to correct the error. Windows XP must always be the last OS installed.
If you can't get both Windows 95 and Windows 98 installations working, quit trying. These operating systems are so closely related that they use the same boot file, so using both operating systems on the same computer isn't possible.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Activating Windows XP
You need to activate Windows XP.

Using a graphical user interface

To activate over the Internet:
  1. Open the Start menu.
  2. Navigate through All Programs Accessories System Tools.
  3. Click on Activate Windows.
  4. Click the first Yes option to activate Windows over the Internet and then click Next.
  5. Select whether to register at the same time. While activation doesn't require any personal information from you, registration does. We'll assume you select No. Click Next.
  6. The wizard will pause for a few seconds, and return a success message.
To activate over the telephone:
  1. Open the Start menu.
  2. Navigate through All Programs Accessories System Tools.
  3. Click on Activate Windows.
  4. Click the second Yes option to activate Windows over the telephone.

Using a command-line interface

Open a command prompt, switch to the C:\WINDOWS\SYSTEM32\OOBE directory, and enter msoobe /a. Then follow step 4 in either section above, depending on your preferred method of activation. (You can't script the activation process, but you can script launching the activation wizard.)
Activation is new to Windows XP and the latest versions of Microsoft Office and is Microsoft's way of enforcing their single-use licenses for these products. Previously, nothing more than dire warnings and license agreement acknowledgments prevented users from installing a single, purchased copy of Windows on more than one computer. The company decided that this abuse was too rampant to ignore and thus built product activation technology into Windows XP.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Viewing the Installed Service Pack and Hotfixes
You need to determine the installed service pack and any installed patches and fixes on a given machine.

Using a graphical user interface

To determine the current level of service pack, right-click on My Computer and select Properties. On the General tab, you'll see the current service pack.
To determine any hotfixes that are installed, go to Control Panel and double-click on Add/Remove Programs. Click the Change/Remove Programs button in the left pane, and make sure the Show Programs checkbox is ticked at the top of the window. You'll see the hotfixes listed—they are under Windows XP-Software Updates.

Using a command-line interface

To determine the current level of service pack, run winver from the command line. A box will pop up showing the current service pack level at the end of the version string.
To determine the installed hotfixes, run systeminfo from the command line, and look under the Hotfixes section. A sample report looks like the following:
Host Name:                 JONLAPTOP
OS Name:                   Microsoft Windows XP Professional
OS Version:                5.1.2600 Service Pack 2 Build 2600
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Uniprocessor Free
Registered Owner:          Jonathan Hassell
Registered Organization:   Jonathan Hassell Omnimedia
Product ID:                55274-770-4137265-22643
Original Install Date:     12/28/2004, 8:52:38 PM
System Up Time:            1 Days, 17 Hours, 14 Minutes, 17 Seconds
System Manufacturer:       Dell Computer Corporation
System Model:              Latitude D600                   
System type:               X86-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: x86 Family 6 Model 9 Stepping 5 
GenuineIntel ~597 Mhz
BIOS Version:              DELL   - 27d40907
Windows Directory:         C:\WINDOWS
System Directory:          C:\WINDOWS\system32
Boot Device:               \Device\HarddiskVolume2
System Locale:             en-us;English (United States)
Input Locale:              en-us;English (United States)
Time Zone:                 (GMT-05:00) Eastern Time (US & Canada)
Total Physical Memory:     511 MB
Available Physical Memory: 80 MB
Virtual Memory: Max Size:  2,048 MB
Virtual Memory: Available: 2,002 MB
Virtual Memory: In Use:    46 MB
Page File Location(s):     C:\pagefile.sys
Domain:                    WORKGROUP
Logon Server:              \\JONLAPTOP
Hotfix(s):                 16 Hotfix(s) Installed.
                           [01]: File 1
                           [02]: File 1
                           [03]: File 1
                           [04]: File 1
                           [05]: File 1
                           [06]: File 1
                           [07]: File 1
                           [08]: Q147222
                           [09]: S867460 - Update
                           [10]: KB834707 - Update
                           [11]: KB873339 - Update
                           [12]: KB885835 - Update
                           [13]: KB885836 - Update
                           [14]: KB886185 - Update
                           [15]: KB887797 - Update
                           [16]: KB890175 - Update
NetWork Card(s):           2 NIC(s) Installed.
                           [01]: Intel(R) PRO/Wireless LAN 2100 3A Mini PCI Adapter
                                 Connection Name: Wireless Network Connection
                           [02]: Broadcom 570x Gigabit Integrated Controller
                                 Connection Name: Local Area Connection
                                 DHCP Enabled:    Yes
                                 DHCP Server:     192.168.0.1
                                 IP address(es)
                                 [01]: 192.168.0.102
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Installing a Hotfix
You need to install a hotfix to update your Windows XP installation.

Using a graphical user interface

The easiest way to get and install hotfixes is through Windows Update. Open Internet Explorer, and browse to http://www.windowsupdate.com. Choose the Express Install option on the page that comes up (you may need to wait a few seconds as the dynamic parts of the page initialize), and then select the updates you'd like. Click Install, confirm your selections, and click Install Now. You'll receive a dialog box informing you of how the patching is doing, and you may be prompted to restart when the patch has been successfully applied.
If you have a standalone copy of a patch, there are a couple of ways to open it. From a GUI:
  1. Double-click on the hotfix to execute it.
  2. Select whether to backup files or not, and then click Next.
  3. Click Next to install the hotfix.
Depending on the type and depth of the patch, you may be required to restart your computer for the hotfix to take effect.

Using a command-line interface

If you have a standalone copy of a patch, the way to open it from the command line is simply to type the name of the patch and press Enter. Command-line patch execution is useful for scripting, so if you have an emergency patch to deploy to several computers at once, you can put the patch command in a login script and so the patch will deploy the next time a user logs on.
In early 2004, Microsoft standardized the names for hotfixes. A typical hotfix name is in the format Q987654_wxp_sp3_x86_en.exe, where:
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Installing a Service Pack
You need to install a service pack for Windows XP.

Using a graphical user interface

Download the service pack file to a known location, and then navigate to that place on your file system. Double-click the file, select whether to make backups of critical system files before the service pack is installed, and then click Next. The service pack will be applied.
This process can take anywhere from 5 to 20 minutes. You'll be required to restart your machine.
You can also obtain service packs from Windows Update now. See Recipe Recipe 2.13 for instructions on how to get hotfixes and other updates from http://windowsupdate.com.

Using Group Policy

You can use the IntelliMirror software distribution functionality of Group Policy to deploy service packs to Windows XP machines that are members of domains. You will need to install the Administrative Tools pack from the Windows Server 2003 CD on your XP workstation.
  1. Expand the service pack into a folder on a file server, and share this folder.
  2. In the Active Directory Users and Computers console, right-click the organizational unit (OU) where you want to create the Group Policy, and then click Properties.
  3. Make a new Group Policy object (GPO) and edit it.
  4. Select Computer Configuration Software Settings Software Installation and make a new package.
  5. Browse to the update.msi file in your shared distribution folder that you created in step 1. Make sure you browse to the network location for the file, and not through a local path.
The next time Group Policy is refreshed on your client machines, the service pack will be deployed.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Slipstreaming a Service Pack or Hotfix into a Build
You want the latest service pack files to be included in the distribution media or location from which you deploy Windows XP to clients.
To slipstream a service pack into a build, follow these steps.
  1. Create a directory called c:\winsp, and copy the downloaded service pack file there. I'll assume the service pack file is named ws2k3sp3.exe.
  2. Extract the service pack to that directory by executing the following command from the command line or from Start Run: ws2k3sp3.exe -x.
  3. Now, update the files from the regular Windows distribution CD with the new service pack files by executing the following command from the command line or from Start Run: D:\wins2k3sp3\i386\UPDATE\UPDATE.EXE -S:C:\windist.
The files are updated and the process is complete. Slipstreaming is an easy way to make sure new systems are updated before they're ever put into production.
To apply hotfixes to an installation while it's in progress, you must use an unattended installation and call the cmdlines.txt file. The following steps are necessary:
  1. Create a distribution folder.
  2. Create the answer file unattend.txt by using the Setup Manager tool. unattend.txt will contain any computer-specific information needed by the commands in the cmdlines.txt file.
  3. Create the cmdlines.txt file by using the Setup Manager tool. cmdlines.txt is a file that contains the commands that would run during the GUI installation. These commands can be hotfix installation commands as well.
  4. Add the I386 folder from the Windows installation CD-ROM to the distribution folder.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Configuring Automatic Updates
Content preview·Buy PDF of this chapter|