|
|
|
|
Windows XP in a NutshellBy David A. Karp, Tim O'Reilly, Troy MottApril 2002 0-596-00249-1, Order Number: 2491 634 pages, $29.95 US $46.95 CA |
Chapter 4 (Excerpts)
Windows XP Applications and Tools\windows\system32\oobe\msoobe.exe
The copy protection scheme in Windows XP (see Figure 4-4).
To Open
Start
Settings
Activate Windows
Command Prompt
![]()
\windows\system32\oobe\msoobe /ADescription
Product activation is a new and somewhat controversial feature in Windows XP. Intending to curb software piracy, Microsoft now requires that each installed copy of Windows XP be activated. This involves contacting Microsoft, either over the Internet or with a telephone call, to obtain a special key to unlock Windows. If Windows is not activated within a certain period, it will expire and refuse to load.
Figure 4-4. Once you've activated Windows XP, you probably won't ever need to again
![]()
The sequence of steps to install and activate Windows is as follows:
- During the installation of Windows, type the 25-character CD Key provided with the Windows XP installation CD. The CD Key distinguishes one end-user license of Windows from another.
- Windows then generates a 20-digit product ID based on the CD Key and the Windows version.
- You, the user, transmit the "Installation ID," comprised of the 20-digit product ID plus an 8-digit hardware ID, to Microsoft. The hardware ID, a unique number based on values obtained from hardware in your computer (see below), distinguishes one computer from another.
- Microsoft responds with a 42-digit Confirmation ID, which is fed into Windows to activate it.
- Since the confirmation ID is based upon the unique CD key and the unique hardware ID, it represents a single, unique system. If someone attempts to activate Windows with the same CD Key and a different hardware key (representing the same copy of Windows being installed on more than one computer), the copy protection will kick in and the product activation will fail.
Notes
- The Hardware ID is based on a hardware hash, a long sequence of numbers based on a information found in your computer's hardware. The specific devices used are as follows:
- Display adapter (video card)
- SCSI adapter (if available)
- IDE adapter
- Network adapter MAC address (if available)
- RAM amount range
- Processor type
- Processor serial number
- Hard drive
- Hard drive volume serial number
- CD-ROM, CD-RW, or DVD-ROM
- In theory, you should be able to upgrade one or two of these components without causing a problem. However, if you replace the motherboard or upgrade several components at once, the hardware ID will change significantly. Since Windows XP compares the confirmation ID against the hardware ID every time Windows is started, a change in the hardware ID will probably void the activation, and you'll have to reactivate Windows.
- It probably goes without saying that the automated activation will probably fail at this point, meaning that you'll have to speak with a Microsoft representative and explain that you're merely reinstalling and not pirating the software. It remains to be seen how much hassle reactivation will be; those who upgrade often will bear the brunt of that hassle.
- If a virus attacks or your computer crashes and you're forced to format your hard disk and reinstall Windows, you'll have to activate Windows again. However since the hardware will probably not have changed, there should be no problem.
- Aside from the hassle involved, the primary focus of the controversy lies in the process by which Microsoft gathers information about users' hardware configurations and how they monitor subsequent alterations. Although Microsoft insists that the online activation is benign, you may want to stick with the tedious telephone activation procedure to be on the safe side.
- Many users may not be confronted with product activation at all. Systems purchased with Windows XP preinstalled may be preactivated as well, in one of two possible ways. Either the manufacturer may choose to activate Windows using the method described above, or by a separate mechanism called System Locked Pre-installation (SLP). SLP ties the hardware ID to the system BIOS, rather than the discrete components listed above. The resulting system may be upgraded more freely, but if the motherboard is replaced or the BIOS is upgraded, the owner will have to reactivate windows as described above. The other exception is the version of Windows XP sold with a volume license, usually to large businesses, which doesn't include the product activation feature at all.
See Also
"Fully Licensed WPA Paper" at http://www.licenturion.com/xp/
File Compare (fc)
\windows\system32\fc.exe
Compare the contents two files (or sets of files) line by line and display the differences between them.
To Open
Command Prompt
![]()
fcUsage
fc file1 file2 [/a] [/c] [/lbn] [/n] [/t] [/w] [/offline] [/nnn] [/l] fc /b filename1 filename2Description
File Compare (fc.exe) compares the contents of two files (or more, using wildcards) and displays the differences (if any). If the files are identical, fc.exe will report
FC: nodifferences encountered. If the files are different, fc.exe lists the differing lines. Here's an example of how fc.exe is used:Start with an ordinary text file, say, Bill.txt. Open it in Notepad, change one line, and save it into a new filename, say, Marty.txt. Then open a command prompt window, make sure you're in the same directory as the two files, and type the following:
fc bill.txt marty.txtThe output will look something like this:
Comparing files Bill.txt and Marty.txt***** Bill.txtWay down Louisiana close to New OrleansWay back up in the woods among the evergreensThere stood a log cabin made of earth and wood***** Marty.txtWay down Louisiana close to New OrleansWay back up in the woods among the antihistaminesThere stood a log cabin made of earth and wood*****For each line or sequence of lines that is found to differ in the two files, fc.exe prints out a pair of excerpts from each of the files. The first and last line in each excerpt are what the two files have in common and are included for context. The lines in between (only a single line in this example) show the differences. The report will include one pair of excerpts for each difference found; if there are three nonconsecutive differing lines, there will be six excerpts. Here are the options for Comp.exe:
file1, file2
- Specify the filenames of the files to compare. For any files that aren't in the current directory, you'll need to include the full path. If file1 includes a wildcard, all matching files are compared to file2. Likewise, if file2 includes a wildcard, each matching file is compared to file1. Both parameters are required.
/a
- Display only first and last lines for each set of differences, as opposed to the default of every different line. This option is only applicable if a single sequence of differing lines (resulting in a single excerpt pair) is three lines or longer; otherwise,
/ahas no effect.
/c
- Disregards the case of ASCII characters; upper- and lowercase letters are treated as identical.
/lbn
- Specify the maximum consecutive mismatches;
/lb17will list only the first 17 differing lines. If omitted, the default is 100 maximum mismatches.
/n
- Include line numbers in the report.
/t
- Preserve any tabs in the files being compared. By default, tabs are treated as spaces with 1 tab = 8 spaces.
/w
- Compress whitespace (tabs and spaces) to a single space for comparison. Possibly useful when comparing .html files, as web browsers will eliminate redundant tabs in spaces as well.
/offline
- Fc.exe normally skips files marked as "offline." Specify
/offline(or simply/off) to include offline files as well. (See "Synchronization Manager," later in this chapter, for more information on offline files.)
/nnn
- Specify the number of consecutive lines that must match after a mismatch. For example, if you specify
/4, a mismatched line followed by 3 matching lines, followed by one or more mismatched lines, is treated as though it were a single sequence of mismatched lines in the report.
/l
- Treat the files as ASCII (plain text). Since
/lis the default, it has no effect.
/u
- Treat the files as unicode text.
/b
- Treat the files as binary and perform the comparison on a byte-by-byte basis (similar to comp.exe, the other file comparison utility). Instead of the pairs of excerpts explained above, differing bytes are displayed in parallel columns. A binary comparison is typically only appropriate for files of the same sizes, but unlike comp.exe, the comparison will still be performed if they are different sizes. The
/boption can't be used in conjunction with any of the other options.
Notes
- Windows XP actually comes with two file comparison utilities, comp.exe (discussed in the previous section) and fc.exe (this one). comp.exe performs a character-by-character comparison, but only displays differences if the files are exactly the same size. fc.exe performs a line-by-line comparison and works regardless of the file sizes. For most users, fc.exe will be the tool of choice, as it displays the differences between the files and doesn't have any prompts, so it can be used from a WSH script or batch file.
- Fc.exe is most useful when comparing two different, but similar, text files. For example, you can compare two Registry patches (since .reg files are plain text files) made at two different times to see what changes have been made. See Chapter 8 for more information on Registry Patches.
- Although fc.exe can compare two binary files, if you try to compare two word processor documents (.doc and .wpd files are binary files), the results won't be terribly helpful. Try converting the documents to an ASCII-based format, such as .rtf or .html, and then perform an ASCII comparison. Naturally, most modern word processors have their own document comparison tools, but they can often be limited; while word processors may miss subtle formatting changes, fc.exe will catch every single difference.
File and Settings Transfer Wizard
\windows\system32\usmt\migwiz.exe
Helps you transfer files and settings from one computer to another.
To Open
Start
Programs
Accessories
System Tools
File and Settings Transfer Wizard
Command Prompt
![]()
\windows\system32\usmt\migwizDescription
The File and Settings Transfer Wizard is a step-by-step guide that walks you through the process of transferring your personal documents, contents of your Favorites folder, Internet Explorer and Outlook Express settings, Desktop and display preferences, dial-up connections, and other settings from one computer to another (see Figure 4-32). The wizard is intended to assist the migration of these files and settings from an "old" computer to a "new" computer, but could be used to duplicate a configuration across several computers just as easily, or even to assist you in upgrading your hard disk.
Figure 4-32. The File and Settings Transfer Wizard helps you migrate your personal documents and preferences to a new computer
![]()
The first question the wizard asks is whether the computer being used is the "new computer" (the machine to receive the files and settings) or the "old computer" (the machine on which the files and settings are currently stored). Although you can begin the process from either computer, it makes more sense to start off from the old computer (unless the old computer is not running Windows XP).
If you choose "Old Computer," the next step is a choice between the following:
Direct cable
- A direct cable connection uses a cable, commonly known as a null modem cable or LapLink cable, to connect two computers for the purpose of the transfer of data. Although it's much cheaper to set up than a network, the speed is glacial by comparison.
Home or small office network
- This option uses a Microsoft Windows peer-to-peer network to transfer data between the two machines. Note that this choice may be disabled if another Windows XP system is not found on the network or if the network does not have all the required protocols installed. If this option is unavailable, you can still utilize your network using "Other," below.
Floppy drive or other removable media
- If you have a zip drive, writable CD drive, writable DVD drive, removable hard disk, or some other removable cartridge drive, the wizard will place the necessary files on the media for later use on the new machine. Note that either the target (new) computer must also have the same drive or you'll need to transfer the drive to the new system.
Other
- Use this option to simply specify a path in which to place the files. This can be a network path, a path to a removable drive, or a folder on your hard disk.
If you choose "New Computer," the next step is a choice between the following:
I want to create a Wizard Disk
- Select this option to use your floppy drive to transfer the wizard program to the old computer, which is useful if the old computer is running earlier version of Windows. The wizard works on Windows 95/98/Me, Windows NT 4.0, Windows 2000, and Windows XP.
I already have a Wizard disk
- This option simply quits the wizard and instructs you to use the wizard disk you already have on the old computer.
I'll use the wizard from the Windows XP CD
- This option also quits the wizard and instructs you how to use the wizard located on the Windows XP installation CD on the old computer.
I don't need the Wizard disk
- This is the only option of the four on this page that is used if you've already run the wizard on the old computer, as it will simply prompt you to locate the files and settings that have been packaged by the wizard.
Once you've chosen an option, follow the prompts on the screen to complete the process.
Notes
- Naturally, you can simply use Explorer and an active network connection or removable drive to transfer the files manually. Furthermore, using carefully selected registry patches, you can transfer many Windows settings and files from one machine to another. While this wizard will make the migration of documents, and especially settings, pretty easy, it may not end up being as flexible or complete as a manual migration.
- Another option is to use Backup (discussed earlier in this chapter) to transfer some or all of your files from one system to another.
\windows\system32\ping.exe
Test the "reachability" of another computer on the network or across the Internet.
To Open
Command Prompt
![]()
pingUsage
ping target [-t] [-a] [-n count] [-l size] [-f] [-w timeout] [-r count] [-s count] [-j host_list | -k host_list] [-i ttl] [-v tos]Description
The primary function of Ping is to see if another computer is "alive" and reachable. Ping works on local networks and across Internet connections. For example, type the following at a command prompt:
ping oreilly.comand you'll get a report that looks something like this:
Pinging oreilly.com [209.204.146.22] with 32 bytes of data:Reply from 209.204.146.22: bytes=32 time=78ms TTL=238Reply from 209.204.146.22: bytes=32 time=31ms TTL=238Reply from 209.204.146.22: bytes=32 time=15ms TTL=238Reply from 209.204.146.22: bytes=32 time=78ms TTL=238Ping statistics for 209.204.146.22:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:Minimum = 15ms, Maximum = 78ms, Average = 50msHere, Ping sent out four pings (the default), reported the time it took for them to return (in milliseconds), and then displayed various statistics about the session. Ping is especially useful if you're having trouble contacting a server and you want to see if the server is alive (running and accepting connections). If the server does not reply (meaning that it is down or the connection has been severed), you'll see
Request timedout. Ping accepts the following options:target
- The machine to ping; it can be the name of a computer on your network, an IP address (e.g.,
209.204.146.22), or an Internet address (e.g., oreilly.com).
-t
- Normally, Ping sends out four pings and then quits. Include the -t option to ping continually until Ping is interrupted by pressing Ctrl-C. Press Ctrl-Break to display statistics without interrupting.
-a
- Resolve addresses to hostnames.
-ncount
- The number of pings to send; the default is four.
-lsize
- The size of the packets to send, in bytes; the default is 32 bytes.
-f
- Turn on the "Don't Fragment" flag in packet.
-wtimeout
- The amount of time to wait, in milliseconds, before Ping gives up and displays
Request timed out; the default is 500 milliseconds (1/2 second).
-rcount
- Display the route taken to reach the server (see "Tracert," later in this chapter). The count is the maximum number of hops to record, and can range from 1 to 9.
-scount
- Display a time stamp for count hops.
-jhost_list
- Impose a "loose" route (see the
-roption) along which to ping.
-khost-list
- Impose a "strict" route (see the
-roption) along which to ping.
-ittl
- Specify the Time To Live (TTL); valid range is from 0 to 255.
-vtos
- Specify the Type of Service (TOS); valid range is from 0 to 255.
Notes
The name "ping" comes from submarine lingo, when sonar was used to detect nearby objects, such as ships and other submarines. Pulses of sound were sent through the water; those that returned indicated the existence of an object off which the pulses were reflected. ping.exe works very similarly, except it sends packets instead of sonic pulses.
See Also
"Tracert," "NSLookup"
\program files\windows media player\wmplayer.exe;
\windows\system32\mplay32.exePlay back video and audio media files, such as .mpg movies, .mp3 songs, audio CD tracks, and .asf streaming media.
To Open
Start
Programs
Accessories
Entertainment
Windows Media Player
Double-click on any associated media file
Command Prompt
![]()
wmplayer(version 8)Command Prompt
![]()
mplay32(version 5)Description
Windows Media Player is the default application used to open and play most of the types of video and audio media supported by Windows XP (see Figure 4-107). Although you can open Windows Media Player from the Start menu, it makes the most sense to simply double-click on a supported media file or click on a link in a web page to open that video or audio clip and play it.
Figure 4-107. Windows Media Player is used to play video and audio clips
![]()
Windows XP actually comes with two different versions of the media player. The main application, Windows Media Player 8 (wmplayer.exe) is the default for all supported media file types, and is the one that is launched from the Start menu. Windows Media Player 5 (mplay32.exe) has a far more modest interface and even supports multiple instances (two or more videos playing at once), but uses the same media player subsystem, so its support for all the different media formats is identical to Windows Media Player 8. Try both to see which one you like better.
The rest of the Windows Media Player (either version) is fairly straightforward, with the standard VCR-like controls (e.g., Play, Stop, etc.).
Windows Media Player 8 supports several additional "gee whiz" features, such as visualizations, which are graphical displays that react to audio. In addition to the visualization plug-ins.com with Windows Media Player 8, you can download additional plug-ins for all sorts of visual effects. Also supported are "skins," which are used to make Windows Media Player look more exotic or interesting. Like visualizations, additional skins can be downloaded and installed (see Figure 4-108).
Figure 4-108. Lots of "skins" help you dress up the Windows Media Player window
![]()
The Radio Tuner in Windows Media Player 8 allows you to listen to radio broadcasts over the Web. Although no special radio hardware is required, a fast Internet connection certainly helps.
CD burning
Windows XP is the first version of Windows to include support for CD writers built-into the operating system (or more specifically, into Windows Media Player and Windows Explorer). The interface is a little awkward, and it doesn't offer the flexibility of most third-party CD burning applications, but it works.
If you have a CD recorder, follow these steps:
- Open Explorer, right-click on the drive icon for your CD recorder, and select Properties.
- Choose the Recording tab and make sure the "Enable CD recording on this drive" option is turned on. Set any other options here as desired and click OK.
- Open the Windows Media Player and go to View
Taskbar
Media Library.
- In the tree on the left, navigate to Media Library
Audio
All Audio (if you're not already there).
- Drag-drop any .mp3 or .wav files into this window in the desired order. Songs can't be rearranged here, but they can be after the next step.
- When you're done, click the "Copy to CD or Device" button on the left (or go to Media Library
Audio
Copy to CD or Device) (see Figure 4-109).
Figure 4-109. Use Windows Media Player's built-in support for CD writers to burn your own music CDs
![]()
- The songs to be written to the CD are shown on the left, and the songs already on the CD (if any) are shown on the right. The songs in the playlist can be reorganized by right-clicking and selecting Move Up or Move Down.
- When you're ready, click the Copy Music button in the upper right. Any .mp3 files are temporarily converted to .wav format, and then all tracks are written to the CD.
This procedure will write audio CDs that can be played by nearly all CD players (with the exception of some older DVD drives). See "Windows Explorer," earlier in this chapter, for details on making data CDs.
Notes
- Although it doesn't come with many of the goodies found in the newer version, Windows Media Player 5 is much simpler to use, loads faster, and takes up less screen real estate.
- If you encounter a video or audio file that Windows Media Player doesn't understand, you can usually add support for it by downloading the appropriate codec (compression/decompression driver). Right-click on the media file, select Properties, and choose the Summary tab to view the name of the required codec (if available). Then, use an Internet search engine (such as http://www.google.com) to locate the codec installer.
- Use the Windows Update feature, discussed later in this chapter, to install the latest drivers, codecs, and updates to the Windows Media Player.
- The CD Player application found in earlier versions of Windows has been removed in Windows XP, and the Windows Media Player has assumed its role in playing audio CDs. To play an audio CD or DVD, just put it in the drive. If a disk is already inserted, you can eject it and reinsert it, or start Windows Media Player and go to Play
DVD or CD Audio.
- To choose the program that plays audio CDs automatically when they're inserted (or to disable autoplay entirely), right-click on your CD drive icon in Explorer, select Properties, and choose the AutoPlay tab. Choose Music CD from the list and choose the desired action below.
Windows Movie Maker
\program files\movie maker\moviemk.exe
Capture, edit, and convert video clips.
To Open
Start
Programs
Accessories
Windows Movie Maker
Command Prompt
![]()
moviemkDescription
A new feature in Windows XP, the Windows Movie Maker allows you to edit and convert video clips, and if you have video capture hardware or a digital video camera, you can even create your own video clips (see Figure 4-111). Windows Movie Maker (and most video editing software) can be quite complex, so we will only include an introduction here.
Figure 4-111. The new Windows Movie Maker lets you edit video clips
![]()
Video editors don't work like most other applications. Instead of opening files, making changes to them, and then saving them, a typical video editing session works something like this:
- Start a new project by going to File
New
Project.
- Add one or more existing video files to the project by going to File
Import. Windows Movie Maker supports many different video formats (see Notes). If necessary, Windows Movie Maker may need to prepare the clips for editing, which may take several minutes.
- All imported videos are then shown in the Collections pane; click a video filename to display "clips," arbitrary divisions in the file intended to make it easier to work with (see Notes, below). Depending on the length of the video, it might be divided into one or dozens of clips .
- Next comes the fun part: editing consists of cutting apart your video and splicing other portions or even other videos together to make a single movie.
The actual video project consists of clips inserted into the timeline (shown at the bottom of the window), not those simply listed in the Collections pane. The timeline is like a storyboard, showing what the final video output will look like in a long a linear display. To add a clip to the timeline, drag it from the Collections pane and drop it at the desired location.
- Using the magnify controls to the left of the timeline, you can zoom in for more precise work or zoom out to see more of the timeline at once.
Above the magnify controls is the storyboard/timeline button: click it to switch between the default Storyboard view (where each clip is the same size) and the more sophisticated Timeline view (where clips are sized relative to their duration). I find the Timeline (the view with the numbers across the top) to be much more intuitive and easier to use, as it shows a more accurate view of the project and allows more precise control when splitting. You can also select the desired view with View
Storyboard and
Timeline.
- The video preview, shown in the upper right, allows you to view the video project as it will appear when you're done. Click the Play button, or simply drag your mouse across the timeline to view any portion of the video project.
When you reach a point in your video when you'd like to cut out footage or insert additional footage, go to Clip
Split (or press Ctrl+Shift+S) to break apart the current video clip into two discrete clips. Once you've split a clip, you can delete a segment by highlighting it and pressing Del, or drag-drop a segment of video from another part of the timeline (or even another video) from Collections into the timeline.
- Once you're happy with the video constructed in the timeline, go to File
Save Project. Note that this only saves the project, it doesn't actually create the final video.
- Use File
Save Movie to create a new video file based on your work in the timeline. No changes to any of the source videos are made. Saving a movie file can take a long time, so you probably will not want to take this step until you're happy with your editing. If you save your project (see the previous step), you can close Windows Movie Maker and then open it up again later and resume your work; it's not necessary to save the movie each time.
Notes
- Windows Movie Maker supports a variety of video formats, allowing you to import videos from a number of different sources into your projects. Among the supported formats are .asf, .avi, .wmv, .mpg movies, .wav and .snd audio files, and .bmp, .jpg, and .gif still image files (see below). Windows Movie Maker is currently the only video editor in existence that can read .asf streaming video files. Previously, Microsoft would not allow any other application to read these files. Even if you prefer not to use Windows Movie Maker to edit your video, it is a great tool for converting .asf files into a more usable format.
- You can also insert still image files into your videos--not only to have a portion of still videos, but to combine a series of video stills into a crude motion video. This is useful, for example, with some still digital cameras that can shoot short video clips, yet store the clips as a series of still images.
- By default, Windows Movie Maker divides imported videos into discrete "clips." Theoretically, one clip ends and another clip begins when the scene changes dramatically. For instance, if the video is of two people talking and the camera alternates between the two participants, each head shot would be its own clip. However, in practice, the clip-making process ends up being completely arbitrary; sometimes you'll only get one clip, and other times, clips will begin and end in the middle of scenes. Go to View
Options and turn off the "Automatically create clips" option to disable this feature. Not only will Windows Movie Maker import video files much more quickly when clips aren't used, but you'll be able to choose where cuts occur (which is really the whole point of the program).
- Imported items added to My Collections are common to all Windows Movie Maker projects and act somewhat like an ordinary folder full of shortcuts. Note that when you delete items from My Collections, it does not affect the original source files.
- Almost immediately after the initial release of Windows XP, an update to Windows Movie Maker was made available (see "Windows Update," later in this chapter) that upgraded it to Version 1.2 and fixed several bugs. It is recommended that everyone obtain this patch.
Back to: Sample Chapter Index
Back to: Windows XP in a Nutshell
© 2001, O'Reilly & Associates, Inc.
webmaster@oreilly.com