tags:

views:

1221

answers:

2

Is there any way to automatically launch an application on USB attach or CD insert on Mac OS X? it's easy on Windows, but I found that AutoRun.Inf does not work on the Mac at all. Please help me. Thanks in advace.

+8  A: 

You can't. Autostarting applications is impossible under Mac OS X.

The next-best thing, opening the CD folder and showing the installer icon, can be done by using http://autoopen.nibfile.com/ to make a .dmg which can then be burnt to a CD.

Ben Alpert
And I can't tell you how happy I am that this is so :)
Jason Coco
Autorun is one of the stupidest things ever invented. ;-)
Ben Alpert
+2  A: 

Don't know why you were voted down - this is a common question for Windows programmers looking at Macs.

Basically, auto-run is considered a security problem and so is not supported in OSX. Soprano's answer is also a bit overkill. Most installers for OSX simply open up a folder to show the application and, possibly, a readme. Installing is done by dragging the app to your Applications folder.

For other kinds of apps on CDs (say, a slide show or something like that), the developer generally uses hidden folders to hide support data to ensure that the only thing the user will see when they open the CD is the single icon they're supposed to double click to start the app.

Mike Heinz