Re: mount dmg disk

2010-03-16 Thread Aaron Burghardt
On Mar 14, 2010, at 3:42 PM, Don Quixote de la Mancha wrote: > On Sun, Mar 14, 2010 at 12:22 PM, gMail.com wrote: >> I can't find a way in Cocoa to mount a dmg disk. >> So I would try to call the shell through a NSTask. > > I think you really want to do that via the APIs in the Disk > Arbitratio

Re: mount dmg disk

2010-03-15 Thread Don Quixote de la Mancha
On Sun, Mar 14, 2010 at 6:42 PM, Kyle Sluder wrote: > This is incorrect. Unix convention requires the program name be the > first argument. Just to clarify, there are a couple reasons for this. The first is that one can use a single binary to implement more than one command line program. Which

Re: mount dmg disk

2010-03-15 Thread Don Quixote de la Mancha
On Sun, Mar 14, 2010 at 12:22 PM, gMail.com wrote: > I can't find a way in Cocoa to mount a dmg disk. > So I would try to call the shell through a NSTask. I think you really want to do that via the APIs in the Disk Arbitration framework. Unfortunately it's rather poorly documented, but it does w

Re: mount dmg disk

2010-03-15 Thread Michael Ash
On Mon, Mar 15, 2010 at 12:33 AM, Kyle Sluder wrote: > On Sun, Mar 14, 2010 at 9:50 PM, Michael Ash wrote: >> NSTask is also not like calling the exec family of functions. NSTask >> implicitly passes the target path as the first argument, and puts your >> arguments starting with argv[1]. > > Durr

Re: mount dmg disk

2010-03-15 Thread Kyle Sluder
On Mon, Mar 15, 2010 at 3:34 AM, gMail.com wrote: > you could be right, but, if I put the program name as first argument, it > doesn't work. Please note I launch the /usr/bin/hdiutil and not the shell. I'm not right. I was thinking of the exec* functions, which require you to pass the program nam

Re: mount dmg disk

2010-03-15 Thread gMail.com
util"]; and this way it works all the time. Regards -- Leonardo > Da: Kyle Sluder > Data: Sun, 14 Mar 2010 18:42:51 -0700 > A: "gMail.com" > Cc: Gwynne Raskind , > Oggetto: Re: mount dmg disk > > On Sun, Mar 14, 2010 at 1:41 PM, gMail.com wrote: >>

Re: mount dmg disk

2010-03-14 Thread Kyle Sluder
On Sun, Mar 14, 2010 at 9:50 PM, Michael Ash wrote: > NSTask is also not like calling the exec family of functions. NSTask > implicitly passes the target path as the first argument, and puts your > arguments starting with argv[1]. Durr. I should have confirmed with the documentation. Sorry for n

Re: mount dmg disk

2010-03-14 Thread Michael Ash
On Sun, Mar 14, 2010 at 8:42 PM, Kyle Sluder wrote: > On Sun, Mar 14, 2010 at 1:41 PM, gMail.com wrote: >> I had to modify just one thing, then it worked: since we invoke directly >> hdiutil, I removed "hdiutil" from the args, so now it looks like: > > This is incorrect. Unix convention requires

Re: mount dmg disk

2010-03-14 Thread Kyle Sluder
On Sun, Mar 14, 2010 at 1:41 PM, gMail.com wrote: > I had to modify just one thing, then it worked: since we invoke directly > hdiutil, I removed "hdiutil" from the args, so now it looks like: This is incorrect. Unix convention requires the program name be the first argument. Remember, NSTask is

Re: mount dmg disk

2010-03-14 Thread gMail.com
ks again. Regards -- Leonardo > Da: Gwynne Raskind > Data: Sun, 14 Mar 2010 15:32:41 -0400 > A: "gMail.com" > Cc: > Oggetto: Re: mount dmg disk > > On Mar 14, 2010, at 3:22 PM, gMail.com wrote: >> Hi, >> I can't find a way in Cocoa to mount a dmg d

Re: mount dmg disk

2010-03-14 Thread Gwynne Raskind
On Mar 14, 2010, at 3:22 PM, gMail.com wrote: > Hi, > I can't find a way in Cocoa to mount a dmg disk. > So I would try to call the shell through a NSTask. > I succeed on the Terminal when executing this command line: > > echo -n password | hdiutil mount /Users/john/Documents/MyDmgDisk.dmg > > Bu

mount dmg disk

2010-03-14 Thread gMail.com
Hi, I can't find a way in Cocoa to mount a dmg disk. So I would try to call the shell through a NSTask. I succeed on the Terminal when executing this command line: echo -n password | hdiutil mount /Users/john/Documents/MyDmgDisk.dmg But when I pass this command line to the NSTask, I fail all the