Does this happen when you are online? Because if it does then you could have a Trojan Sub7 or similar and someone has accessed your system.......opening and closing the cdrom is one 'trick' they can do......others include wiping your hard-drive.
Thanks for suggestions so far but the DVD Rom drive on my PC is still opening and closing now anything up to 3 or 4 times when I boot up the PC. Sometimes it opens and doesn't close. Often when I try to open the drive the tray comes out and immediately goes back in, making it difficult to put in a CD or DVD. When I can get the CD or DVD inserted, the drive will close when the button is pressed, and the CD or DVD will play normally. The drive is a Toshiba DVD Rom SD-M1402. I downloaded and installed a new driver for this drive yesterday, from the Toshiba website.
Perhaps it might be a good idea to unplug the drive and remove all reference to it from System properties. Start the computer up with it un-installed and then shut it down, plug it back in and then start up. This should re-install it from scratch. Not sure if this will fix it but it is probably worth a try.
This thread is now locked and can not be replied to.