Duplication Centre

CD, DVD, Blu-ray duplication

01702 530 354

24 Hour Turnaround

Posts Tagged ‘DIY Programming’

How to Create an Autorun CD

Wednesday, November 18th, 2009

Is easy to create an Autorun CD for yourself!

An autorun CD is a CD which will play automatically when you insert it into a computer.  They are also surprisingly easy to create:  All you need to do is to add to your CD an autorun file, a straightforward text file made in notepad, which instructs your computer to start an executable file.

An Autorun CD can be used for many reasons, not least of which for business and advertising purposes:  It looks very professional if when your customer loads a CD into their computer it automatically starts running.  Also, it makes the customers life easier, and ensures that even those people who aren’t very technologically capable can use your CD.  You could even use it to send holiday photos or a home video to a friend or relative who can’t really use a computer!

Depending on what kind of file you are trying to run, you will need to use a different kind of autorun command.  There are two main types:  The first uses the ‘open’ command and will run any file ending in ‘.exe’ – that’s software – and the second is the ‘shellexecute’ command which will open nearly any file in it’s designated application – this is needed for powerpoint presentations, videos and other files that require software to open them.  For photos, you may want to create a slideshow program, instructions for which will follow in a later article.

1.    Creating an autorun file using the ‘open’ command

•      Open ‘Notepad’
•      Write ‘[autorun]’ on the first line
•      Write ‘open=filename.exe’ on the second line
•      Save as ‘autorun.inf’

1.    Creating an autorun file using the ‘shellexecute’ command

•      Open ‘Notepad’
•      Write ‘[autorun]’ on the first line
•      Write ‘shellexecute=filename.filetype’
•      Save as ‘autorun.inf’

NB – The ‘shellexecute’ command was only introduced with Windows 2000 so you will need either that model or a later one to make it work.

Also, for both ‘shellexecute’ and ‘open’ commands there should be no spaces in any of the text in an autorun file.  Instead, replace spaces in filenames with underscores, otherwise the autorun will not work.  And if a file you want to run is inside a folder, then instead of writing simply ‘filename.filetype’ you should write ‘foldername/filename.filetype’.

Some users may have intentionally switched off the autorun option on their machines but this only counts for a small percentage of consumers.

An Extra Little Something

If you have mastered that and want to experiment with something a little fancy, you could try adding a ‘label’ and/or ‘icon’ command to your CD.  These two commands give your disc a personal icon and label in Explorer, which you can make anything you want, so long as you provide the image for the icon too.

•      To add the ‘icon’ command start a new line in the autorun file and type ‘icon=filename.ico’  (.ico files are very simple to make:  All you need to do is create a 30×30 pixel image in MS Paint, then choose to save the file as a .ico file, an option which can be selected from the dropdown menu in the ‘save file’ window.)
•      To add the ‘label’ command start a new line in the autorun file and type ‘label=text_of_your_choice’

How to Save Your Autorun File

Simply save your autorun file as ‘autorun.inf’ in the root folder of you CD, the top-most folder in which everything else is stored.  Note that it will not work if it is inside any other folder!

Have fun creating your Aurtorun CD’s!

Duplication Centre Resource Centre is proudly powered by WordPress | Entries (RSS) | Comments (RSS) | 19 queries. 0.023 seconds.