By far the most common screw found in modern PCs and other computers is a No. 6-32
machine screw, 1/4" to 1/2" in length with a combination #2 Phillips (cross) and 1/4" hex
head.
However, Compaq workstations and servers tend to have No. 6-32 machine screws with a
combination Torx/slotted head. This is typical of Compaq's history of designing their
own standards and overengineering solutions to problems. (Update March 2002: It appears that on Compaq's latest line of computers (including several Itanium servers), they have given up on the Torx screws in favor of more standard Phillips/Hex head screws. This will no doubt upset many Compaq-only shops, but will come as joyful news to any multi-vendor customer.)
For mounting 5 1/4" devices (CD-ROM drives, DVD drives, old hard drives, and 3
1/2" to 5 1/4" mounting adapters) and some 3 1/2" 1.44MB floppy drives in drive
bays, usually a No. 4-40 screw with a #1 Phillips head is needed. These were also
commonly found at most mounting points on IBM PC/XT computers (from which the 5 1/4"
mounting bay size is derived).
Pieces of rackmount equipment, typically found in server rooms and network closets, are most
commonly mounted with a No. 10-32 size machine screw (often with a combination
philips/slotted head), but some racks (e.g. APC) have custom-fitted (or... gasp...metric) nuts and bolts for
mounting equipment.
In summary, you will never have the screw you need.