Windows normally detects virtually any optic drive fitted. Have you tinkered with anything inside the case? It sounds as if either of the two cables, the white one with red black & yellow leads or the wide grey one with black plug may be making a poor connection. With PC off, but still plugged in, remove case, earth yourself to get rid of static on a screw, pull plugs out, one at a time & refit. See if that does the job. If the drive grey ribbon cable to the motherboard connection is dodgy, then again it won`t be detected. Jiggle it at the m/b socket.