Your CD and other driver autoplay fine, but when you inserted in a flash drive through your USB port, autoplay does not work.

This is how you can fix it.

Originally Posted by TheGreatX

1. Open your run box (Start | Run) and type regedit and click OK.
2. Go to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer.
3. You should see a key called NoDriveTypeAutoRun (see picture below). Double click it and set the Value Data to 91 (hexadecimal).
4. Restart your computer and it should be fixed.

Thanks very much Ameoba22, now the autoplay works fine for my flash drive.
In fact I did not find the key called NoDriveTypeAutoRun in the mentioned path (HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer), instead I did it by :
1- Open your run box (Start | Run) and type regedit and click OK.
2- From the toolbar open Edit, then choose Find: NoDriveTypeAutoRun
3- Double click it and set the Value Data to 91 (hexadecimal).
4- 4. Restart your computer and it should be fixed.