Articles Archive
Articles Search
Director Wiki
 

Autorun

November 6, 1997
by Pat McClellan

Dear Multimedia Handyman
I've seen CDs which start the program automatically, as soon as the CD is inserted. Can I do this for my Director programs?

Signed,

A Highly Motivated Self-Starter

Dear HMSS,

No problemo. Actually, you don't really do it "in" Director, but we can set up your CD so that your Director projector gets launched automatically when the CD is inserted. However, the answer is different for Mac vs. Windows -- and this time, the Windows side is easier.

On the Mac, you'll need an Xtra called AutoStart, written by Glenn M. Picher. The Windows counterpart to this Xtra is called AutoRun.EXE, also written by Picher. Both Xtras are distributed by g/matter. These Xtras offer a number of features such as sequential program loading for low-memory environments or directing the user's installed browser to a specific URL. There is also some built-in logic to prevent multiple copies of the program from being started inadvertantly.

There is a much quicker alternative for Windows 95/NT, if you simply want to launch your projector. In fact, I was amazed at just how easy this is to pull off!

Start by opening Notepad, or another text editor. Enter the following text:

Save the file as "autorun.inf" and place it at the root level of the CD-ROM, along with your Director projector. You must specify a file path if the projector is not at the same location as the autorun file. Obviously, insert the name of your projector in place of "start.exe". The third line of the file allows you to specify an icon file to be displayed for the CD-ROM. The icon file should also be placed at the root level of the CD-ROM. If you don't have a custom icon, simply omit this line.

That's all there is to it. Now, when the CD-ROM is inserted, autorun.inf will be read... bigpict.ico will be displayed as the icon for the CD-ROM drive... and start.exe will be launched. If you quit the program but leave the CD in the computer, clicking on the CD-ROM drive icon will launch the program again. NOTE: this prevents the user from easily accessing the files on the CD-ROM because whenever the CD drive icon is clicked, the program runs. The files are still accessible from Windows Explorer, so it's not a safe way to protect your files.

Patrick McClellan is Director Online's co-founder. Pat is Vice President, Managing Director for Jack Morton Worldwide, a global experiential marketing company. He is responsible for the San Francisco office, which helps major technology clients to develop marketing communications programs to reach enterprise and consumer audiences.

Copyright 1997-2017, Director Online. Article content copyright by respective authors.