Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I automatically run an application on USB attach or CD insert on Mac OS X?

Tags:

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.

like image 246
Yigang Wu Avatar asked Jan 04 '09 06:01

Yigang Wu


People also ask

Does Mac have autorun?

There is no autorun in OSX anymore. Show activity on this post. You can't set an application to autorun for security reasons. However you can set a Finder window to auto open on insert.


2 Answers

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 (AutoOpen version 1.0) to make a .dmg which can then be burnt to a CD.

like image 186
Sophie Alpert Avatar answered Oct 17 '22 07:10

Sophie Alpert


Basically, auto-run is considered a security problem and so is not supported in OSX. Sophie Alpert'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.

like image 30
Mike Heinz Avatar answered Oct 17 '22 08:10

Mike Heinz