I thought this was only an XP and Vista error, but I've seen it in Windows 7 too!
To solve the Code 39 error, or "broken CD drive" follow these instructions:
NOTE: After removing these registry keys and rebooting, it may be necessary to reinstall any CD or DVD recording applications.
1) Close all open programs
2) Click on Start, Run, and type REGEDIT and press Enter
3) Click on the plus signs (+) next to the following folders
4) This folder is the DVD/CD-ROM Drive Class Description in the registry. Look for any of the following names in the right hand column.
5) If any of the above keys shown in step 4 are listed, right-click on them and choose Delete
6) After deleting the keys, close the Registry Editor
7) Reboot your computer
8) Open My Computer and check to see if your CD or DVD drives have returned. You
may also want to open Device Manager and verify that the yellow exclamation and
error code on the CD or DVD drive is gone.