Sunday 27 October 2013

How to make a CD autorun

Wow, it has been quite a while since i have posted anything on my blog, sorry for that. but i am back now and can't wait to tell you about all the things i have learned. so let us start off with something really simple, something that has baffled me since i started burning my programs to disk. how to make the main program automatically run on your disc when you insert it.

So you have a program that you want to distribute on a disc, but you dont want users to have to open the disc and look for the main program and run it etc. because like all IT proffesionals and hobbyist alike know, end users are really dumb, even with the simple things. so we want windows to show us that nifty "splash screen" to install the product. But first we have to know what windows looks for to create this screen, and also to know what to display on this screen. so when a disc is first inserted to the drive windows scans it for any setup information files, this file tells windows what to do with the disc, like open a specific program. these files have the extension .inf . Like most of you should have guessed by now we are going to make one of those files.

First a .inf file is really just a simple short and small text file with the .inf extension.
-open your text editor like notepad or  Notepad++

-write the following to the file

     [autorun]
  open=example.exe

  icon=example.ico

where "example.exe" is the name of your program to run and " example.ico" is a picture file (.ico fileformat) or icon to be used. *note this is optional.

 -then save the file as a "Autorun.inf" and not "Autorun.txt ." meaning goto saveas and select all file fomats from the dropdownlist and type the full filename with extension.

now that you have created this file you are ready to burn to disc, all three these files eg. "Autorun.inf", "example.exe" and "example.ico" need to be in the root directory of the disc. meaning dont put them in folders.

and there you have it making a program run when disc is inserted.

Happy Hacking
MiniMite