I have a load of jpgs that I want to package and give as a birthday present on a CD. What I would like is that when you put the CD into the drive of a Windows PC it automatically displays a splash screen (one of the jpgs on the CD) with a ‘Start’ button. When you press the button it starts a jpg viewer app that is also on the CD (CDisplay.exe - a Windows comic reader utility handling jpg and gif files) so the lucky receiver of the gift can start reading the comic straight away. No going into Windows Explorer to find files. No wandering what the hell is on the CD.
I have no idea how to do this. Can anyone help? Suggest a website where this sort of thing is explained?
It’s done with an autorun.inf file - see Wikipedia article
What you need is a file in the root directory of the CD, called Autorun.inf, which is a text file containing the following lines:
[autorun]
OPEN=CDisplay.exe
You can also have an optional ICON=somefile.ico after the OPEN line. That seems to be all there is to it. One point I should mention is that Autorun can be disabled on computers, so it won’t always work. I always have it disabled; for example, although it’s enabled by default on all Windows installations, I think.
Actually, for the system to work as specified you’d have to write another small program capable of handling the splash screen.
If required, you can pass on command line parameters to your autorun program - like if CDisplay needed to know what its default working directory was, and could be told so with ‘CDisplay \images’
hope that helps.
It also tends to get disabled by Windows without explicitly being told, in my experience. I don’t think I’ve seen that happen in XP, but earlier versions always seemed to forget to process autorun.inf after a while.
While doing so, keep in mind that anything that “auto-does” anything is at least decently likely to be stopped short in its tracks by security software, if not today then perhaps tomorrow.
And in this case, with good historical precedent. The last Macintosh virus, and one of the very few EVER to do significant damage, spread itself on removable media by piggybacking on the auto-play settings for auto-playing a CD on insertion. (This was back in the MacOS 8/9 days and it was known as the AutoStart worm).