Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MetaCipher

macrumors newbie
Original poster
Mar 3, 2008
3
0
I have a program that displays images for different devices to install drivers for. What I want it to do is you click on your OS (10.4 or 10.5) and have it automatically open the DMG or mpkg (DMG is preferred) like it does as if I opened it from a folder or the desktop. Does anyone know how to do this?

(I've looked at execl and it doesn't do anything currently, I assume I need to pass the dmg is an argument to some program so it automatically mounts, and opens and Mac does its fun stuff).

Thanks.
 

kpua

macrumors 6502
Jul 25, 2006
294
0
I'm not sure it's what you're looking for, but passing an argument to /usr/bin/open is essentially the same as double-clicking the file in the Finder.
 

MetaCipher

macrumors newbie
Original poster
Mar 3, 2008
3
0
kpua, thanks that is exactly what I needed, but it seems that everytime I try to use execl it simply doesn't work. It always returns "Operation not Supported" - 45 error. I've tried using simply ls, and such, and it still doesn't work.

execl("ls", 0);

I am not sure what is going on.

Running the command from a terminal though works just fine.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.