Choose what happens when you insert a CD or DVD
If your Mac has a built-in optical drive, or if you connect an external optical drive (for example, an Apple USB SuperDrive), you can choose what your Mac does when you insert certain types of CDs and DVDs. For example, you can open photo editing software whenever you insert a picture CD, or run an AppleScript script that backs up your important documents whenever you insert a blank DVD.
Choose Apple menu > System Preferences, then click CDs & DVDs. (If you don’t have an optical drive built into or connected to your Mac, CDs & DVDs preferences aren’t available.)
Use the pop-up menus to choose an action for the type of inserted disc.
Some apps can start processing an inserted disc immediately. For example, iTunes can immediately import songs from a music CD, and DVD Player can immediately play a video. To find out how to set up an app to start processing a disc immediately, see the app’s help.