You have seen that most of the time when you insert a CD in your CD-ROM, you will get a screen with instructions about how to install the software. All the CDs made with Autorun mode enabled perform this action. Usually, we all use softwares to write a CD. Few software will offer this Autorun feature and few will not. But I will teach you a method to write a CD with Autorun mode enabled with any software.
Open a notepad and write.
Setup.exe is file which will be executed at runtime and icon.ico is the icon of your CD. Now, save this file as autorun.inf
Insert your blank CD in the CD-ROM and run your software which you use to write the CD. In that software, you will get option to select the files to write. Select your files which you wish to write and select this autorun.inf file, setup.exe, and icon.ico too and write the CD. Now, whenever you will insert the CD into the CD-ROM, your setup.exe will start automatically without any click.