Autoplay play feature is not only available in CD drives, but also on the flash drives and external hard drives that you connect to your PC. In any case your external drives or CDs are infected with virus or malwares, then chances are there that your PC could also be infected with the autoplay feature. Best way to combat this issue is to disable autoplay on all your system drives.
To disable autoplay on all drives, best method is to change it through Group Policy Editor. To do this click run and type gpedit.msc and press enter. Navigate to Local Computer Policy-> Computer Configuration->Administrative Templates-> System. Now on the right panel double click Turn off Autoplay. Now select enabled and choose All drives from the dropdown list and click ok.
Now autoplay feature will be disabled on all drives which you connect to your PC.